Lairds
Lairds

Reputation: 87

Errors when importing database in phpmyadmin

When i try to import my DB i get this error. I don't know what I should do, please help.

--

-- Database: oddjobexchange

--

-- ---------------------------------------------------- --

-- TABLE structure FOR TABLE admin -- CREATE TABLE IF NOT EXISTS admin ( Email varchar( 30 ) NOT NULL , Password varchar( 35 ) NOT NULL , PRIMARY KEY ( Email ) ) ENGINE = InnoDB DEFAULT CHARSET = latin1;

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Table structure for table admin

CREATE TABLE IF NOT EXISTS admin ( `Em' at line 10

help!

Upvotes: 0

Views: 485

Answers (2)

Lairds
Lairds

Reputation: 87

Just need to add the follwing to top of file.

CREATE DATABASE databasename; USE databasename;

Upvotes: 0

John Conde
John Conde

Reputation: 219804

There needs to be a space after the first two dashes. Otherwise it is not a valid comment:

------------------------------------------------------ --

should be:

-- ---------------------------------------------------- --

Upvotes: 2

Related Questions