Title: MySQL Restore Difficulties &#8212; error in SQL syntax
Last modified: August 19, 2016

---

# MySQL Restore Difficulties — error in SQL syntax

 *  [bcohen](https://wordpress.org/support/users/bcohen/)
 * (@bcohen)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/mysql-restore-difficulties-error-in-sql-syntax/)
 * I’ve been obliged to restore a WordPress installation from a dump. The data originally
   came from MySQL v4.1.20. When I reinstalled MySQL I used 4.1.22.
 * Anyway, I created the database and tried used the following command to reload
   the data:
 * mysql -u root -p databasname < /path/to/databasename which results in MySQL making
   the following complaint,
 * “ERROR 1064 (42000) at line 133: 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 ‘-commerce char(1) NOT NULL default ”,
    wp-user char(1) NOT NULL 
   default ”, ‘ at line 9″
 * I’m not a mysql programmer so this error falls on blind eyes. I gather this is
   a “parse error” but I’m not at all sure how to fix this. Any help would be appreciated.
 * Here’s the SQL,
 * CREATE TABLE bjcwp_comms (
    id bigint(20) unsigned NOT NULL auto_increment, email
   varchar(255) NOT NULL default ”, mobile varchar(64) NOT NULL default ”, name 
   varchar(255) NOT NULL default ”, title varchar(255) NOT NULL default ”, organisation
   text NOT NULL, subscribed char(1) NOT NULL default ”, wp-user char(1) NOT NULL
   default ”, wp-user-id bigint(20) unsigned default NULL, time datetime NOT NULL
   default ‘0000-00-00 00:00:00’, PRIMARY KEY (id), KEY subscribed (subscribed) )
   TYPE=MyISAM;

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

 *  [chrishowell](https://wordpress.org/support/users/chrishowell/)
 * (@chrishowell)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/mysql-restore-difficulties-error-in-sql-syntax/#post-831664)
 * I’m sorry to see no one is responding to this request for help. I have a very
   similar problem. I’m trying to move my WordPress database to a new server. I’m
   getting the following error:
    ERROR 1064 (42000) at line 1: 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 ‘our importer:</p>
    - Can no longer retrieve comments on posts.
    - ‘ at line 1
 * Any help would be appreciated. I’m off to the MySql forum….
 *  [sfpkent](https://wordpress.org/support/users/sfpkent/)
 * (@sfpkent)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-difficulties-error-in-sql-syntax/#post-831688)
 * I am looking for the solution as well but who can help?
 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-difficulties-error-in-sql-syntax/#post-831689)
 * Two vaguely related but different problems have been described.
 * The first one was because the – character in the table name was causing an issue,
   most likely the table name hadn’t been quoted.
 * The second one looks like a quote mark in the text to be imported is causing 
   a problem, potentially in that case the quote mark would need to be located and
   replaced with two quote marks.

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

The topic ‘MySQL Restore Difficulties — error in SQL syntax’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 4 participants
 * Last reply from: [mrmist](https://wordpress.org/support/users/mrmist/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/mysql-restore-difficulties-error-in-sql-syntax/#post-831689)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
