• Resolved active_lad

    (@active_lad)


    I have backed up my current WordPress Site using the WordPress Database Backup v1.8 Plugin. When I try and restore this to a new Database (as I am moving hosting providers) I get the following error:

    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 )
    )ENGINE = MYISAM DEFAULT CHARSET = latin1

    MySQL said:

    #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’ at line 10

    Presumably it’s the Default Characterset that’s the problem. How do I find what Default Characterset I should be using? I’m using phpMyAdmin 2.5.7-pl1 on the new database.

    Unfortunately, my knowledge of MySQL is very very limited, so apologies if this appears to be a very dumb question!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter active_lad

    (@active_lad)

    I managed to get to the bottom of this. The source database was MySQL 4.1 but the destination was MySQL 4.0. The “DEFAULT CHARSET” table option is not supported by MySQL 4.0. I edited the SQL dump file and changed the entries from “DEFAULT CHARSET=latin1” to “CHARSET=latin1” using search and replace. This fixed the problem and the SQL file loaded perfectly.

    Thread Starter active_lad

    (@active_lad)

    Topic marked resolved.

    Thanks, this did the trick for me too.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error Restoring Backup’ is closed to new replies.