关于MySQL导入:第32769行的错误:未知命令'\''

时间:2013-01-05 00:34:13

标签: mysql database mysqldump

我在尝试导入数据库时​​收到以下错误:

第32769行的错误:未知命令'\''。

我做了一些搜索,发现这可能是因为转储不是使用--hex-blob命令创建的。

不幸的是,我现在没有机会这样做,因为这是我的主机发生不合时宜的raid /硬件故障之前的最后一次备份。

我可以做些什么来导入我的数据库?

更新

导入时尝试使用--force和--max_allowed_pa​​cket = 1000M。以下是它返回的样本......

ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: 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 '}',1,1352344791,0),('performanceCache','',0,1317594187,0),('promenu','a:1:{s:7:\' at line 1
ERROR 1064 (42000) at line 32769: 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 'a:7:{i:9' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: 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 'a:19:{s:10:\"promenu_id\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: 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 's:1:\"9\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: 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 's:13:\"promenu_title\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             iption\"' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th
ERROR at line 32769: Unknown command '\"'.
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th                                                                                                             ' at line 1
ERROR at line 32769: Unknown command '\"'.
ERROR 1064 (42000) at line 32769: You have an error in your SQL syntax; check th
/*!40000 ALTER TABLE `cache_store` ENABLE KEYS */' at line 1
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR at line 682781: Unknown command '\''.
ERROR 1153 (08S01) at line 682781: Got a packet bigger than 'max_allowed_packet'

4 个答案:

答案 0 :(得分:3)

尝试了MySQLWorkbench并意识到我忘了在命令行中添加--default-character-set=utf8。用--default-character-set=utf8再次尝试,现在也可以从命令行导入。

我的命令行是:

mysql -u <username> -pac1 <password> --default-character-set=utf8 <schema> < <dumpfile>

答案 1 :(得分:0)

数据库最终被破坏了。无法恢复或导入。

答案 2 :(得分:0)

如果您不是要导入的SQL文件,则会收到该错误。我曾经尝试导入一个tar.gz(它有一个不同的名称,我忘了它被压缩,实际上是一个SQL文件集合),这个错误提醒我; - )

答案 3 :(得分:0)

如果所有其他方法都失败了,请尝试使用MySQLWorkbench而不是命令行导入, 这对我有用。