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

问题描述

今天导入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

解决办法

登入的时候加–binary-mode=1

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

链接到文章: https://ixvps.com/47700.html

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注