MYSQL导入csv类型的数据出现The MySQL server is running with the --secure-file-priv option

今天尝试使用 into outfile导出数据的时候出现错误:

The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

上网查了一下,应该是mysql设置的权限,可以使用

show variables like '%secure%';查看 secure-file-priv 当前的值是什么

 上面的这个“/root/”是我修改之后的,刚开始报错的时候查看这个值是“NULL”。

我们需要在配置文件中修改这个值

然后再重启系统就可以了。

 

posted @ 2018-10-29 19:46  峰哥ge  阅读(2103)  评论(1编辑  收藏  举报