完整报错
ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: '▒▒-'.
情景再现
使用命令往数据库中导入表的时候出错
mysql -u root -p databaseName < file.sql
原因
编码问题
解决
- 将file.sql文件改为utf8 编码格式
- …
参考
stackoverflow
https://stackoverflow.com/questions/17158367/enable-binary-mode-while-restoring-a-database-from-an-sql-dump