码迷,mamicode.com
首页 > 数据库 > 详细

MYSQL导入数据出现The MySQL server is running with the --secure-file-priv

时间:2018-08-30 16:50:38      阅读:410      评论:0      收藏:0      [点我收藏+]

标签:导入数据   mysql   running   技术分享   lib   variable   png   权限   出现   

MYSQL导入数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

方法一:

这个原因其实很简单,是因为在安装MySQL的时候限制了导入与导出的目录权限

只能在规定的目录下才能导入

我们需要通过下面命令查看 secure-file-priv 当前的值是什么

show variables like ‘%secure%‘;

技术分享图片

 

我们可以看到value的值为/var/lib/mysql-files/

那么我们把导入的路径改为上面的值就可以了

方法二:

  如果觉得这样太麻烦,那么我们就需要改配置文件,找到my.ini配置文件,修改路径,重启

MYSQL导入数据出现The MySQL server is running with the --secure-file-priv

标签:导入数据   mysql   running   技术分享   lib   variable   png   权限   出现   

原文地址:https://www.cnblogs.com/manzb/p/9560616.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!