MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
2017-07-21 16:37
1111 查看
我相信很多同学都遇到过这样的问题
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的值为E:\mysql\
那么我们把导入的路径改为上面的值就可以了
方法二:
如果觉得这样太麻烦,那么我们就需要改配置文件,
到C:\ProgramData\MySQL\MySQL Server 5.7目录下找到my.ini
的配置文件,(注意ProgramData是隐藏目录需要去 计算机->工具->文件夹选项 里面把隐藏的文件显示出来)
在my.ini文件中搜索secure-file-priv找到并将它的值改为
secure-file-priv=‘’(注意不是下划线)
重启MySQL就可以在任何目录下操作了(如果重启MySQL不行就重启电脑,博主亲测)
重启方法为:
右键点击 计算机->管理->服务和应用程序->找到MySQL点击右键->重新启动
如果觉得不错的小伙伴,请动动你可爱的小指头,为博主点个赞。*^_^*
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的值为E:\mysql\
那么我们把导入的路径改为上面的值就可以了
方法二:
如果觉得这样太麻烦,那么我们就需要改配置文件,
到C:\ProgramData\MySQL\MySQL Server 5.7目录下找到my.ini
的配置文件,(注意ProgramData是隐藏目录需要去 计算机->工具->文件夹选项 里面把隐藏的文件显示出来)
在my.ini文件中搜索secure-file-priv找到并将它的值改为
secure-file-priv=‘’(注意不是下划线)
重启MySQL就可以在任何目录下操作了(如果重启MySQL不行就重启电脑,博主亲测)
重启方法为:
右键点击 计算机->管理->服务和应用程序->找到MySQL点击右键->重新启动
如果觉得不错的小伙伴,请动动你可爱的小指头,为博主点个赞。*^_^*
相关文章推荐
- mysql导入数据 提示 The MySQL server is running with the --secure-file-priv
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- Mac上csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方
- Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- mysql 导出数据到文件 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so
- mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
- Mac上csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方法【转】
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option
- The MySQL server is running with the –secure-file-priv
- mysql导出表到CSV文件方法及提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- MySQL 报错Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- MYSQL 5.7报错 Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it..