0

I am trying to import Mysql Data taken from Wordpress blog locally on Window 7 system. One way or other it is giving error.

The table wp_commentmeta was giving error. I have deleted all aksimet rows, but still error was coming. So, quit that table and included other tables. But now as well error is coming, which I do not understand:

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---- eNo1jTsKwzAQRAPu9hRzACEs2S6ynRDCDugXSYlPkCKN+9w+ciBTDY/HjCslFYZVsBreRYaChlJU W8cDUfjUu2cscpGTpkctSFXArC42gafr0v4+YLeSguvWKKeRcjCMufdZKspbPj2R6rnSyRX7LcZG 3sSV8Trod0DD5Z8vxK4ftA== ----END CUT---- ----BEGIN RAW---- ERROR: C1 C2 LEN: 1 2 11 STR: MySQL: 5.5.32 USR OS, AGENT, VER: Win CHROME 5.0.30 PMA: 4.0.4.1 PHP VER,OS: 5.4.19 WINNT 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

The error is from PHPMyAdmin.

3
  • means? I am uploading the file which I have downloaded from PHPMyAdmin. Commented Oct 13, 2013 at 11:23
  • Even after cleaning DB using "WP Clean Up" is not working and giving me same error. Commented Oct 13, 2013 at 11:24
  • Open the .sql file in Notepad and look at the start. You'll see those characters.Delete them. Save the File. import again Commented Oct 13, 2013 at 11:30

4 Answers 4

2

Just a warning message for everyone. I remember, I used to use command line more than any tool like phpMyAdmin. Today phpMyAdmin has taken so many hrs. phpMyAdmin was not exporting correctly and all problem was due to that.

Not even phpMyadmin could import its own exported data. I used mysqldump and then mysql ... db < sql.sql and it worked at lightening speed.

#mysqldump -u userName -p --add-drop-table --insert-ignore --result-file downloads/db_name_dump-oct-14.sql db_name

Then downloaded the file using FileZilla, and on Wins 7:

>mysql -u root -proot  wordpress < db_name_dump-oct-14.sql

Remember, do not give semi-colon at last.

Sign up to request clarification or add additional context in comments.

Comments

1

Those characters are an encoded parser report. When decoded with scripts/decode_bug.php, it reports: ERROR: C1 C2 LEN: 1 2 11 STR:

MySQL: 5.5.32 USR OS, AGENT, VER: Win CHROME 5.0.30 PMA: 4.0.4.1 PHP VER,OS: 5.4.19 WINNT LANG: en SQL:

So, it cannot report which SQL statement gave a problem. Maybe your import operation was incomplete, due to some incorrect server settings. See FAQ 1.16 in phpMyAdmin documentation include in your kit, or http://www.phpmyadmin.net/home_page/docs.php.

3 Comments

I have increased the size of upload_max_filesize, memory_limit and post_max_size after getting error from Wordpress when using only Post export from WP and then imported Post only through WP. Not sure after that I have tried again with phpMyAdmin. Will give it a try. But phpMyAdmin should have reported like WP did.
mysql> source C:/Users/xyz/Downloads/db_wt.sql; has worked a little, but given error which is difficult to understand: ERROR 1064 (42000): 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
I got the answer and memory recall in the process. Posted here. Thanks. voted for help.
1

Check the last line of your .sql file in an editor(Sublime Text or whatever you prefer). Does it have strange characters there? ETXNULLNULLNULLNULL etc. Remove that line and retry your import. Worked for me.

2 Comments

Yes, you are right. I see this in notepad++ wins7. hmm! The chars you printed is not printable. I copied and pasted here but came as space. Voted. But answer I got is to use mysqldump that is posted here. I will accept that as an answer. Thanks.
Yeah, to me this happened after the latest update to PHPMyAdmin. Didn't have this problem before I updated my PHPMyAdmin installation.
0

Just want to tack on a note that using TextWrangler I could not see the extra characters or text at the end of the sql document; however, I did see a white space, so I selected and deleted it, then saved. When I then imported into the database, the error disappeared! So take heart, Mac users, or rather TextWrangler users, who might have been mystified by the missing characters.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.