• Resolved oledr

    (@oledr)


    When trying to move my Blog (and with that, my database) I get the following error message:

    MySQL returnerede: Dokumentation

    #1064 – You have an error in your SQL syntax near ‘ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ‘ at line 28

    My database code looks like this:

    CREATE TABLE wp_categories (
    cat_ID bigint( 20 ) NOT NULL AUTO_INCREMENT ,
    cat_name varchar( 55 ) NOT NULL default ”,
    category_nicename varchar( 200 ) NOT NULL default ”,
    category_description longtext NOT NULL ,
    category_parent bigint( 20 ) NOT NULL default ‘0’,
    category_count bigint( 20 ) NOT NULL default ‘0’,
    PRIMARY KEY ( cat_ID ) ,
    KEY category_nicename ( category_nicename )
    ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =16

    Any ideas? From previous postings I get that posting one table at a time i maybe a possibility, but when I do this, I get the same error message.

    Ole

    By the way: WordPress is great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • MichaelH

    (@michaelh)

    The problem is the DEFAULT CHARSET = latin1

    1. Make a copy of your .sql file
    2. Open the .sql file in a plaintext editor like notepad or notepad2
    3. Do a search/replace and replace “DEFAULT CHARSET = latin1” with nothing. So in the example above:

    MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT

    will read

    MYISAM AUTO_INCREMENT

    Thread Starter oledr

    (@oledr)

    Thanks a lot! It came up with a similar error on “ENGINE=MyISAM” but I deleted that one also, and now it works.

    MichaelH

    (@michaelh)

    And thanks for reporting back with your solution!

    Thank you guys for this help. I’ve been trying to restore a mysql backup for hours. The docs online are not good.

    Question – why do we have to remove the ENGINE=MyISAM DEF… etc? Is it because we’re going from a newer ver of mysql to an older vers of mysql during the backup/import process?

    Thanks again for your help,
    Scott
    https://www.incidentlog.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving database to new domain: “SQL syntax error”?’ is closed to new replies.