MySQL Error Migrating WordPress
I just exported my Wordpress Database from an old server and imported it to a new server. The process I used was the usual PHPMyAdmin process that I do regularly so no issue there...
I got this error message and not sure what it means. Some of my website appears broken now on the new server and I feel this has something to do with it..
Error
There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:
----BEGIN CUT----
eNo1jL0KwyAYRQvZvqe4DyBSNSHgJiLJ4F817V5Chy7ZCs3bxxR6p8PlcFwpqWhYASvhXdQQkBCC
6tLujijs9eY1Bj5wpeheC1JlMJOLC8PDNSk8V9i5pOCadeWqpxyMRt94pDzn02Kpng3JxQj/3j5f
8iZOGq+NfnnqLv8djMMfvA==
----END CUT----
----BEGIN RAW----
ERROR: C1 C2 LEN: 1 2 11
STR:
MySQL: 5.5.33
USR OS, AGENT, VER: Mac CHROME 5.0.34
PMA: 4.0.7
PHP VER,OS: 5.2.17 Linux
LANG: en
SQL:
----END RAW----
SQL query:
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 '' at line 1
[ Back ]
Solutions
Open your exported file into any editor and check if is there any special character or any line breakers are there? sometimes special characters stops the import process. In more i would suggest to check phpmyadmin version and mysql version.Or you can directly copy and past to sql tab in phpmyadmin see if it gives any error or not.
Not sure if you have shell access, but I use mysqldump it will avoid encoding issues .
https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html