MySQL / PHPMyAdmin Database Error Exporting & Importing

jerdoggmckoy

Active Member
Jun 3, 2013
36
0
6
St Paul, MN
cPanel Access Level
Root Administrator
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:

  • 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
  • When my 'sql' export file downloads, it says I'm using PHP Version 5.3.17
  • 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!
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Have you tried importing a different database to rule out any issues with your specific tables?

Thank you.
 

monarobase

Well-Known Member
PartnerNOC
Jan 26, 2010
512
3
68
France
cPanel Access Level
Root Administrator
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
 

monarobase

Well-Known Member
PartnerNOC
Jan 26, 2010
512
3
68
France
cPanel Access Level
Root Administrator
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 :

Code:
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
^C^@^@^@^@^@^@^@^@^@
The line causing the problem is :

Code:
^C^@^@^@^@^@^@^@^@^@
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.