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在任意目录的导入导出
修改 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),我们将第一时间核实后及时予以删除。