Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    1

    Unanswered: 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??

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •