• Resolved knotty

    (@knotty)


    I did restores successfully before, don’t know what’s wrong here.

    1.I downloaded the whole blog files to c:/ and ftped it to the new host.

    2. Made a sql backup and created the exact same mysql db at new host. When trying to restore sql, I get this error:

    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 32

    Thanks..

Viewing 8 replies - 1 through 8 (of 8 total)
  • khimichcom

    (@khimichcom)

    Seems that you are trying to import into 3.x MySQL dump from 4.x database

    It is not a mysql version problem.

    DEFAULT CHARSET=latin1

    Open the .sql file in a plaintext editor
    Replace the line above with nothing (there are at least 9 so use search/replace)
    Save
    Retry ??

    (and modify a copy – just in case)

    Thread Starter knotty

    (@knotty)

    Oh boy podz, it worked like a charm! I was beginning to sweat bullets!

    Thank you, thank you!
    knotty back to normal.

    Excellent ??

    cookiedude

    (@cookiedude)

    I get nearly the same error. Only in my scenario it says:

    #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 'collate utf8_unicode_ci NOT NULL default '',category_nicen</code>

    And also, the import stops at this point (according to phpMyAdmin):
    CREATE TABLE wp_categories (
    cat_ID bigint( 20 ) NOT NULL AUTO_INCREMENT ,
    cat_name varchar( 55 ) COLLATE utf8_unicode_ci NOT NULL default ”,
    category_nicename varchar( 200 ) COLLATE utf8_unicode_ci NOT NULL default ”,
    category_description longtext COLLATE utf8_unicode_ci NOT NULL ,
    category_parent int( 4 ) NOT NULL default ‘0’,
    PRIMARY KEY ( cat_ID ) ,
    KEY category_nicename ( category_nicename )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT =15;`

    Any idea what needs to be done? Thanks in advance for your help!

    khimichcom

    (@khimichcom)

    The same problem, you trying to import more recent mysql’ dump, than your system handles. If you have not any unusual symbols in your database (used by utf8), then just replace with any texteditor “COLLATE utf8_unicode_ci” strings to nothing.

    cookiedude

    (@cookiedude)

    Ah thanks. Found out that setting export compatibility to “MYSQL40” also did the trick and imported the database just fine. Unfortunately I do use “unusual symbols”, the special characters from the German alphabet. I’ve read that I need to set the character encoding to latin1 when importing in phpMyAdmin, but I don’t have that option. Are there any tools that will let me convert the character encoding of the SQL dump? I tried Notepad++, but that doesn’t have the options I need, I can only convert from UTF-8 to ANSI etc.

    jersey

    (@jersey)

    cookiedude….. the mysql40 tricked worked for me as well. thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Mysql Restore Problem’ is closed to new replies.