WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Database Restore Issue (5 posts)

  1. faughnan
    Member
    Posted 9 years ago #

    I switched hosts and I am following the tutorials at http://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

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

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    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.

  4. faughnan
    Member
    Posted 9 years ago #

    Yes! Thank you so much Podz!

  5. calebcop
    Member
    Posted 9 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.