If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Mysqldump import problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-25-04, 17:57
daveboyle99 daveboyle99 is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
Mysqldump import problems

Hi All,

I backed up a database of one of our servers using mysql dump. Now I want to put it on one of the other server, but I'm getting the following error.

mysql> CREATE TABLE naked (
-> index VARCHAR(8) NOT NULL default'',
-> company VARCHAR(64) NOT NULL default'',
-> add1 VARCHAR(64) NOT NULL default'',
-> add2 VARCHAR(64) NOT NULL default'',
-> add3 VARCHAR(64) NOT NULL default'',
-> add4 VARCHAR(64) NOT NULL default'',
-> add5 VARCHAR(64) NOT NULL default'',
-> telephone VARCHAR(16) NOT NULL default'0'
-> ) TYPE=MyISAM;
ERROR 1064: You have an error in your SQL syntax near 'VARCHAR(8) NOT NULL default'',
company VARCHAR(64) NOT NULL default'',
add1 ' at line 2


Anyone got any ideas why this is happening??
Reply With Quote
  #2 (permalink)  
Old 07-28-04, 20:00
yellowmarker yellowmarker is offline
Registered User
 
Join Date: Jul 2004
Location: Dundee, Scotland
Posts: 107
It doesn't like you using "index" as a field name as it is a reserved keyword.

see:
http://dev.mysql.com/doc/mysql/en/Reserved_words.html
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On