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

╰半夏微凉° 2023-10-17 18:54 118阅读 0赞

今天尝试使用 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 当前的值是什么

Center

导出的数据必须是这个值的指定路径才可以导出,默认有可能是NULL就代表禁止导出,所以需要设置一下

知道mysql安装路径下的my.ini文件,设置一下路径:

Center 1

然后重启数据库即可;

Center 2

来源:https://blog.csdn.net/man\_to\_home/article/details/54947518

发表评论

表情:
评论列表 (有 0 条评论,118人围观)

还没有评论,来说两句吧...

相关阅读