在MySQL导入:ERROR在第32769行:未知命令'\' [英] On MySQL import: ERROR at line 32769: Unknown command '\''
问题描述
我在尝试导入我的数据库时收到以下错误:
I'm receiving the following error while trying to import my DB:
ERROR在第32769行:未知命令'\''。
ERROR at line 32769: Unknown command '\''.
我做了一些搜索,发现这可能是因为转储不是用--hex-blob命令创建的。
I've done some searching and found that this can be because the dump was not created with the --hex-blob command.
不幸的是,我没有机会这样做,因为这是在我的主机有一个不合时宜的RAID /硬件故障之前最后一次备份。
Unfortunately, I don't have the opportunity to do that now as this was the last backup made prior to my host having an untimely raid/hardware failure.
我可以做什么来获取我的数据库导入吗?
Is there anything I can do to get my DB imported?
更新:
导入时使用--force和--max_allowed_packet = 1000M尝试。
Tried using --force and --max_allowed_packet=1000M when importing. Here's a sample of what it returned...
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'
推荐答案
试用MySQLWorkbench我忘了在命令行中添加 - default-character-set = utf8
,用 - default-character-set = utf8
现在从命令行导入工作。
Tried MySQLWorkbench and realized I forgot to add --default-character-set=utf8
during command line. Tried it again with --default-character-set=utf8
and now import works from command line too.
我有命令行:
mysql -u <username> -pac1 <password> --default-character-set=utf8 <schema> < <dumpfile>
这篇关于在MySQL导入:ERROR在第32769行:未知命令'\'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!