0
votes

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!

2

2 Answers

2
votes

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

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

should be:

-- ---------------------------------------------------- --
0
votes

Just need to add the follwing to top of file.

CREATE DATABASE databasename; USE databasename;