Title: Database Error when import the data
Last modified: August 18, 2016

---

# Database Error when import the data

 *  [osuns](https://wordpress.org/support/users/osuns/)
 * (@osuns)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/database-error-when-import-the-data/)
 * When I import the data, the following error appears,
 * Error 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 ‘; INSERT INTO `
   wp_link2cat` VALUES (‘1′,’1′,’2’); INSERT INTO `wp_link2cat` ‘ at line 1
 * I don’t know what I’m doing wrong, but I could easily import my data before.
   
   I’m using WordPress 2.1. Any help is much appreciated!

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

 *  [icooltools](https://wordpress.org/support/users/icooltools/)
 * (@icooltools)
 * [19 years ago](https://wordpress.org/support/topic/database-error-when-import-the-data/#post-517333)
 * Interesting. I am also getting the same error when I use feedwordpress.
 * WordPress database error: [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‘)’
   at line 2]
    INSERT INTO wp_link2cat (link_id, category_id) VALUES (16, )
 *  [op351com](https://wordpress.org/support/users/op351com/)
 * (@op351com)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-import-the-data/#post-517394)
 * Hi there,
 * I’ve gone through the same situation when I was trying to import my database 
   from old 1.5 version to a brand new 2.2 installation. I was getting 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 ‘ï»¿
 * DROP TABLE IF EXISTS `wp_categories`‘ at line 1
    —-
 * How I got over:
 * 1 – backed up OLD database on sql format (extension .sql) using phpMyAdmin
    2–
   opened the backup file with Wordpad and changed it to new environment (because
   I moved my blog to a different domain and server) by updating domain name, server
   root directory, admin email, etc 3 – VERY IMPORTANT STEP: saved backup file as
   text file (extension .txt) 4 – changed the extension of the saved file (with 
   the new environment variables) from extension TXT to extension SQL 5 – cleaned
   up new 2.2 installed database by dropping all tables in there (they were still
   empty) 6 – imported old database to the new 2.2 installation by using phpMyAdmin:
   I didn’t get any error this time!! 7 – signed in the new blog (I noticed there
   was some system errors but didn’t worry) 8 – when inside the admin area the first
   thing I got was a warning to upgrade database and I said yes… 9 – finally I went
   through all steps inside admin area for blog configuration
 * Now I have other changes in process but all posts, comments, users and so on 
   are all there, in the new 2.2 installation.
 * Hope it works with you.

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

The topic ‘Database Error when import the data’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [op351com](https://wordpress.org/support/users/op351com/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-import-the-data/#post-517394)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
