mysql导入sql文件的时候报告ERROR: ASCII ‘0’ appeared in the statement

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,经过测试就可以了

mysql导入sql文件的时候报告ERROR:  ASCII '0' appeared in the statement

2)网上还有说使用登入的时候加–binary-mode=1

mysql --binary-mode=1 -h127.0.0.1 -uroot -p123456 -P3306
mysql> use mysql;
mysql> source /data/tse.sql

Original: https://www.cnblogs.com/Sungeek/p/12923821.html
Author: Tse先生
Title: mysql导入sql文件的时候报告ERROR: ASCII ‘0’ appeared in the statement

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/8293/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总