1、問題描述:
今天導入SQL文件做測試,但是執行的時候發現如下錯誤提示:
ERROR: 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: ''. Bye
2、解決方法:
1)把SQL文件在頭加入sublime-file-save with encoding - utf-8 with bom,經過測試就可以了

2)網上還有說使用登入的時候加--binary-mode=1
mysql --binary-mode=1 -h127.0.0.1 -uroot -p123456 -P3306 mysql> use mysql; mysql> source /data/tse.sql
