MySQL / PHPMyAdmin Database Error Exporting & Importing
Hello, sometime recently, I started getting an error message when importing an sql database using PHPMyAdmin. When I go in and export the sql database through PHPMyAdmin, I just select the database I want, hit the export tab, choose custom & then tick the Add Drop Table and then I save the exported database.
Then, just to repeat the error, I go in and drop all the tables. Then when I go to import the database, I get the error message I'm posting below.
A couple of notes before I post the error:
[LIST]When I view my PHP Info on the website, it says I'm using PHP Version 5.2.17, which is correct since that's what I've selected when compiling EasyApache
[LIST]When my 'sql' export file downloads, it says I'm using PHP Version 5.3.17
[LIST]I also just found out that if I export my sql database using SSH, and then import the database using PHPMyAdmin, everything appears to have worked just fine. So it appears the error is with the database exporting currently.
Error Message:
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----
eNo1zbEKwjAYBGCh2/8U9wAxNKlByBZKqEKaxKRWcBWHQskm6NubCt54fNzZlELS6AV6CWe9hoCE
EJSnWjdE4ydfnIbiindy/1hXuuaEkBnMYP3EMNsKb0vBGO5n50ylLcXRaBx4yxXFU9wMC3lb6bg4
wi3l9SZn/KDxLPQ7oGb3zxcWUiEE
----END CUT----
----BEGIN RAW----
ERROR: C1 C2 LEN: 1 2 11
STR:
MySQL: 5.5.32-cll
USR OS, AGENT, VER: Win MOZILLA 5.0
PMA: 4.0.5
PHP VER,OS: 5.3.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
Thanks in advance for any help!
-
Hello :) It's normal to see a different PHP version in phpMyAdmin because it uses it's own internal PHP that is separate from the PHP used with Apache. As for the error message, could you let us know how large the database is? It's sometimes preferred to use the command line for larger databases. Thank you. 1 -
Thanks for the help. The database in question is only 747kb. Any other things I could try looking at? Again, I appreciate the help! 0 -
Have you tried importing a different database to rule out any issues with your specific tables? Thank you. 0 -
I noticed the same thing a short time ago. I think its something to do with phpymyadmin adding extra lines as although there is the error all the data is imported correctly. Next time it happens I'll examine the imported file a bit closer 0 -
I've just openend an export of a database with textmate and it shows the file contains something after the last line that won't be pasted here, seems like invisible characters at the end of the file that aren't compatible during the import. In vim the filal lines are : /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; ^C^@^@^@^@^@^@^@^@^@
The line causing the problem is :^C^@^@^@^@^@^@^@^@^@
0 -
Could you let us know which version of cPanel you have installed? The issue you described should have been resolved in phpMyAdmin 4.0.8, which is available in cPanel version 11.40. Thank you. 0 -
11.38 :) It's not an important issue as no customers have had problems so far. We will upgrade to 11.40 when it goes to the stable branch. 0
Please sign in to leave a comment.
Comments
7 comments