WordPress.org

Forums

Database Error (5 posts)

  1. holocron
    Member
    Posted 9 years ago #

    I am moving my install to a new host. Following the instructions at http://www.tamba2.org.uk/wordpress/move2/...

    When trying to restore my data to the new database at the new host I get the following 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 int( 4 ) NOT NULL default '0',
    PRIMARY KEY ( cat_ID ) ,
    KEY category_nicename ( category_nicename )
    ) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT =8

    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=8' at line 9

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

    DEFAULT CHARSET=latin1

    That's the bit that is breaking it.
    You don't say how big your sql file is.
    If it can be opened easily in a plain text editor, do so then do a search/replace and replace that line above with nothing.

    If the sql file is very large, use this:
    http://www.zen77857.zen.co.uk/data/xampp3/SCR.zip
    and that will do the job without you needing to open the file.

    Once that charset line has gone, all should be good :)

  3. holocron
    Member
    Posted 9 years ago #

    So this: ") ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT =8"

    Becomes: ") ENGINE = InnoDB AUTO_INCREMENT =8"

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

    Yup.

    Getting rid of just the charset bit is the goal.

  5. holocron
    Member
    Posted 9 years ago #

    Thanks. Worked famously!

Topic Closed

This topic has been closed to new replies.

About this Topic