Title: Moving database to new domain: &#8220;SQL syntax error&#8221;?
Last modified: August 18, 2016

---

# Moving database to new domain: “SQL syntax error”?

 *  Resolved [oledr](https://wordpress.org/support/users/oledr/)
 * (@oledr)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/)
 * When trying to move my Blog (and with that, my database) I get the following 
   error message:
 * MySQL returnerede: Dokumentation
 * #1064 – You have an error in your SQL syntax near ‘ENGINE=MyISAM DEFAULT CHARSET
   =latin1 AUTO_INCREMENT=16 ‘ at line 28
 * My database code looks like this:
 * 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 AUTO_INCREMENT =16
 * Any ideas? From previous postings I get that posting one table at a time i maybe
   a possibility, but when I do this, I get the same error message.
 * Ole
 * By the way: WordPress is great!

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/#post-341942)
 * The problem is the DEFAULT CHARSET = latin1
 * 1. Make a copy of your .sql file
    2. Open the .sql file in a plaintext editor
   like notepad or notepad2 3. Do a search/replace and replace “DEFAULT CHARSET 
   = latin1” with nothing. So in the example above:
 * MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT
 * will read
 * MYISAM AUTO_INCREMENT
 *  Thread Starter [oledr](https://wordpress.org/support/users/oledr/)
 * (@oledr)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/#post-342055)
 * Thanks a lot! It came up with a similar error on “ENGINE=MyISAM” but I deleted
   that one also, and now it works.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/#post-342060)
 * And thanks for reporting back with your solution!
 *  [sbrodsky](https://wordpress.org/support/users/sbrodsky/)
 * (@sbrodsky)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/#post-342178)
 * Thank you guys for this help. I’ve been trying to restore a mysql backup for 
   hours. The docs online are not good.
 * Question – why do we have to remove the ENGINE=MyISAM DEF… etc? Is it because
   we’re going from a newer ver of mysql to an older vers of mysql during the backup/
   import process?
 * Thanks again for your help,
    Scott [http://www.incidentlog.com](http://www.incidentlog.com)

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

The topic ‘Moving database to new domain: “SQL syntax error”?’ is closed to new 
replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [sbrodsky](https://wordpress.org/support/users/sbrodsky/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/moving-database-to-new-domain-sql-syntax-error/#post-342178)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
