本文介绍了第1153行的MySQL错误:未知命令"\"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过命令行导入mysqldump文件,但是继续出现错误.我使用以下命令从其他服务器上转储了文件:
I am trying to import a mysqldump file via the command line, but continue to get an error. I dumped the file from my other server using:
mysqldump -u XXX -p database_name > database.sql
然后我尝试使用以下文件导入文件:
Then I try to import the file with:
mysql -u XXX -p database_name < database.sql
加载一小部分然后卡住.我收到的错误是:
It loads a small portion and then gets stuck. The error I receive is:
ERROR at line 1153: Unknown command '\''.
我通过以下方式检查了文件中的那一行:
I checked that line in the file with:
awk '{ if (NR==1153) print $0 }' database.sql >> line1153.sql
恰好该行的大小超过1MB.
and it happens to be over 1MB in size, just for that line.
有什么想法吗?
推荐答案
您的数据库中有二进制blob,请尝试在您的mysqldump语句中添加--hex-blob.
You have binary blobs in your DB, try adding --hex-blob to your mysqldump statement.
这篇关于第1153行的MySQL错误:未知命令"\"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!