当前位置: 首页 >数据库 > 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

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

使用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在任意目录的导入导出

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 _ JavaClub全栈架构师技术笔记

 

 

修改 secure_file_priv 值:

在 /etc/my.cnf 里加入一行代码: secure_file_priv='' 

重启数据库,再导入数据。

 

作者:心恩惠动
来源链接:https://www.cnblogs.com/Xinenhui/p/16359943.html

版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaclub.cn/database/118401.html

标签:SQL_syntax
分享给朋友:

“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” 的相关文章

必须拿下的Mybatis动态SQL 2022年05月17日 21:28:59
利用Oracle分析函数row 2022年06月03日 23:42:05
MYSQL查询某字段为空的数据 2022年06月08日 21:35:13
mysql查询给某个字段赋值 2022年06月10日 21:43:53
mysql查询各分区数据量大小 2022年06月10日 23:41:45
MYSQL查询一个月前的数据 2022年06月12日 09:48:55
Mysql查询用户最后一次登陆时间 2022年06月12日 13:54:22
mysql查询结果保留2位小数不够补0 2022年06月12日 20:39:53