Title: Mysql Restore Problem
Last modified: August 18, 2016

---

# Mysql Restore Problem

 *  Resolved [knotty](https://wordpress.org/support/users/knotty/)
 * (@knotty)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-problem/)
 * 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](https://wordpress.org/support/users/khimichcom/)
 * (@khimichcom)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338163)
 * Seems that you are trying to import into 3.x MySQL dump from 4.x database
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338167)
 * 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](https://wordpress.org/support/users/knotty/)
 * (@knotty)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338175)
 * Oh boy podz, it worked like a charm! I was beginning to sweat bullets!
 * Thank you, thank you!
    knotty back to normal.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338184)
 * Excellent 🙂
 *  [cookiedude](https://wordpress.org/support/users/cookiedude/)
 * (@cookiedude)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338523)
 * 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](https://wordpress.org/support/users/khimichcom/)
 * (@khimichcom)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338534)
 * 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](https://wordpress.org/support/users/cookiedude/)
 * (@cookiedude)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338538)
 * 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](https://wordpress.org/support/users/jersey/)
 * (@jersey)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338597)
 * 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.

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 5 participants
 * Last reply from: [jersey](https://wordpress.org/support/users/jersey/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/mysql-restore-problem/#post-338597)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
