2

突然导入数据库备份返回以下错误。奇怪的是,导入一个旧的工作副本就可以了。如果我之后直接导出它并尝试重新导入它,则文件会出现此错误。

看起来是导致问题的 PhpMyAdmin 导出。我不知道的 PhpMyAdmin 导出过程是否有任何变化?

看起来像我的问题,但解决方案对我不起作用。

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:

----INIZIO CUT----
eNo1jU0KwjAYRIXuvlPMAWIw0SrNLoTQLvJn0roXF1IQ3Sjo7U0FZ/UYHjM255gVjICRcDYoCEgI
QWWsdUPkP+XoFFou+L5b3x5XmkpGLAy6t2FkONkq+vMFZsjR22puuOwoea2wq9xSGtJisViWnS0X
B7j5/nqT06FXmJ/0u6Bm9c8XSs4hPQ==
----FINE CUT----

----INIZIO RAW----
ERROR: C1 C2 LEN: 1 2 11
STR: MySQL: 5.1.69-log
USR OS, AGENT, VER: Mac CHROME 5.0.29
PMA: 4.0.5
PHP VER,OS: 5.3.17 Linux
LANG: it
SQL: 

----FINE RAW----



Query SQL:

Messaggio di MySQL: 
#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

(我翻译了错误中的内容,因为我的 phpmyadmin 是意大利语)

4

2 回答 2

3

我有同样的问题,我找到了解决方案。使用任何代码编辑器打开 sql 文档,在最后一行的最后,您会看到一些黑色的奇怪代码,只需删除和保存就可以了,因为它对我有用。

我不确定导出数据库时如何以及为什么会生成此代码。

于 2013-10-21T18:29:58.623 回答
1

您正在运行一个过时的 phpMyAdmin 版本。我相信https://sourceforge.net/p/phpmyadmin/bugs/4095/中提到的修复(对于即将到来的 4.0.8 版本)会对您有所帮助。

修复的直接链接(可应用于 4.0.7):https ://github.com/phpmyadmin/phpmyadmin/commit/b717657de77db0b58179bdbdd88e23d0fc3d7ea6

于 2013-09-30T16:46:57.660 回答