首页 > 数据库> > ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
作者:互联网
使用load命令导入数据时报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/tmp/ck.txt into table test1' at line 1
查看 secure_file_priv 对应的值:
- secure_file_priv 为 NULL 时,表示限制mysqld不允许导入或导出
- secure_file_priv 为 /tmp 时,表示限制mysqld只能在/tmp目录中执行导入导出,其他目录不能执行
- secure_file_priv 没有值时,表示不限制mysqld在任意目录的导入导出
修改 secure_file_priv 值:
在 /etc/my.cnf 里加入一行代码: secure_file_priv=''
重启数据库,再导入数据。
标签:ck,tmp,secure,syntax,导入,file,your,priv 来源: https://www.cnblogs.com/Xinenhui/p/16359943.html