• Resolved faughnan

    (@faughnan)


    I switched hosts and I am following the tutorials at https://www.tamba2.org.uk to back up and restore my database. I have managed to back up my database fine (I guess). When I go to restore it, I get an error. I’m at the part where I click on the SQL tab and paste the contents of the .sql file or upload it. I tried both methods and I get the same error:

    ERROR:
    SQL query:

    CREATE TABLE wp_categories (
    cat_ID int( 4 ) NOT NULL AUTO_INCREMENT ,
    cat_name varchar( 55 ) NOT NULL default ”,
    category_nicename varchar( 200 ) NOT NULL default ”,
    category_description text NOT NULL ,
    category_parent int( 4 ) NOT NULL default ‘0’,
    PRIMARY KEY ( cat_ID ) ,
    UNIQUE KEY cat_name ( cat_name ) ,
    KEY category_nicename ( category_nicename )
    ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =2

    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 ‘DEFAULT CHARSET=latin1 AUTO_INCREMENT=2’ at line 10

    Now, I have no clue what any of this stuff means. Any help would be greatly appreciated!

    Lindsay

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    When exporting your database via phpmyadmin, make sure that “Add AUTO_INCREMENT value” is selected.

    DEFAULT CHARSET=latin1

    Open your file in notepad, or use the SCR program I mention in the guides, and get rid of that line above. Then the import will be fine.

    Just do a search/replace and replace DEFAULT CHARSET=latin1 with nothing.

    Thread Starter faughnan

    (@faughnan)

    Yes! Thank you so much Podz!

    Getting rid of that line worked for me too! Thanks Podz! Hopefully people having this problem will see this thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database Restore Issue’ is closed to new replies.