can't restore mysql database (5 posts)

  1. pipsy
    Posted 9 years ago #

    hi. i'm moving servers, and just backed up my database.
    now when i try to load that database into my new server i keep on getting this error:

    SQL query:

    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 )

    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=6' at line 10

  2. bobmorris60
    Posted 9 years ago #

    Maybe your new server doesn't support 'latin1' as a DEFAULT CHARSET. This is the version of the alphabet that it uses.

    Call your tech support and ask to speak to someone who understands mySQL.

  3. vkaryl
    Posted 9 years ago #

    All you need to do is open the file in something "vanilla" like notepad2, and edit out DEFAULT CHARSET=latin1. Now there might be other errors as well; I've occasionally had to edit out ENGINE = MYISAM too. But start with removing the DEFAULT CHARSET=latin1 statement. Be sure you leave one space between ENGINE = MYISAM and AUTO_INCREMENT =6

    Oh. You'll need to edit every table structure section; pretty much all of them include the same stuff.

  4. pipsy
    Posted 9 years ago #

    it did what you suggested, and it worked!

    thank you for your help!

  5. vkaryl
    Posted 9 years ago #

    You're welcome! Have fun....

Topic Closed

This topic has been closed to new replies.

About this Topic