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

---

# Restore Database Problem

 *  [risach](https://wordpress.org/support/users/risach/)
 * (@risach)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/restore-database-problem/)
 * I was following the instructions (Codex [1](http://codex.wordpress.org/Backing_up_your_database),
   [2](http://codex.wordpress.org/Restoring_your_database_from_backup), [Podz](http://www.tamba2.org.uk/wordpress/backup/))
   closely to backup my local WP1.5-database (MySQL 4.1.9, phpAdmin 2.6.1-pl3) and
   restore it on the server-site (MySQL 4.0.23a, phpMyAdmin 2.6.1-pl2).
    After selecting
   my local backup.sql-file the server’s phpMyAdmin gave me the error:
 * >  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 AUTO_INCREMENT=6’ at line 10
 * Could anybody help? What kind of measures do I have to take to fix this, as I
   understand it, Charset-encoding problem?
 * Thanks for help!
 * Btw: As a total OS X-Cocoa-head I would love to use CocoaMySQL instead of phpAdmin:
   but my first attempts to choose the right settings failed. Are there any guides
   or stuff available, specifically for using CocoaMySQL and WordPress? Couldnt 
   find none so far.

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/topic/restore-database-problem/?output_format=md)
[1](https://wordpress.org/support/topic/restore-database-problem/?output_format=md)
2

 *  [jamesinealing](https://wordpress.org/support/users/jamesinealing/)
 * (@jamesinealing)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163648)
 * Just to add a note that I had the same #1064 mySQL error and found a solution–
   the secret for me was to change the ‘SQL export compatibility’ option in phpMyAdmin
   2.6.1-PL2 to MYSQL4.0 and then the restore worked error-free.
 *  [ojoshiro](https://wordpress.org/support/users/ojoshiro/)
 * (@ojoshiro)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163835)
 * Hi there,
 * I have the following error occuring while trying to restore my backup on a new
   server :
 * #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 ‘visit` bigint(
   11) NOT NULL default '0',
    
   stamp` datetime defa
 * Does this pain have to do with the CHARSET issue ?
 * I can’t find a way to change the SQL export compatibility as mentioned above 
   🙁
    Any idea someone ?
 *  16260
 * [21 years, 2 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163836)
 * If it is the CHARSET issue, then one solution is to edit the .sql file and remove
   that line from each ‘create_table’ part.
 *  [ojoshiro](https://wordpress.org/support/users/ojoshiro/)
 * (@ojoshiro)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163837)
 * Yep. Unfortunately, there’s no reference to the CHARSET variable in my .sql backup
   file 🙁
    I guess it’s something else… Thanks anyway !
 *  [cheewl](https://wordpress.org/support/users/cheewl/)
 * (@cheewl)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163861)
 * I had the same problem after editing the .sql file to replace the old domain 
   with the new domain.
 * I managed to solved it simply by saving it using Notepad with ANSI encoding. 
   Hope it helps you too 🙂
 *  [miaow](https://wordpress.org/support/users/miaow/)
 * (@miaow)
 * [21 years ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163865)
 * Thank you, THANK YOU for the suggestion to ‘delete each instance of the charset
   being mentioned’ – I _knew_ that changing webhosts wasn’t going to be as easy
   as it seemed – and when I got this error when trying to restore my database, 
   I was pulling my hair out! Deleted all mentions and it is now telling me ‘Your
   SQL-query has been executed successfully’. Yay!
 * 🙂
 *  [paperlion](https://wordpress.org/support/users/paperlion/)
 * (@paperlion)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163892)
 * Aahh, an old post. Hope these still get read.
 * I am having other character set problems.
 * Starting with a Windows-1250 (Central European) encoded email that looks fine,
   I bath it in Notepad (or various other re-encoders), resaving there as UTF8. 
   Copy again and paste into WordPress. Still fine. Backup and restore, and presto–
   apostrophes and quotes have become question marks.
 * 1) Is this something with backup / restore encoding changes?
 * 2) If WP is displaying it correctly, isn’t it then solid UTF8?

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/topic/restore-database-problem/?output_format=md)
[1](https://wordpress.org/support/topic/restore-database-problem/?output_format=md)
2

The topic ‘Restore Database Problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 22 replies
 * 8 participants
 * Last reply from: [paperlion](https://wordpress.org/support/users/paperlion/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/restore-database-problem/page/2/#post-163892)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
