首页 > 数据库技术 > 详细

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

时间:2019-10-30 14:51:33      阅读:70      评论:0      收藏:0      [点我收藏+]

报错内容:The MySQL server is running with the --secure-file-pri option so it cannot execute this.

报错原因:mysql文件的导入和导出路径有默认的设置,即 secure-file-priv,当传入或传出的csv文件路径与默认的路径冲突时就会报错。

解决办法:

    打开my.cnf文件:vim /etc/my.cnf

    技术分享图片

 

 

      在my.cnf 文件中添加一行内容:secure-file-priv=""

    重启mysql:service mysqld restart

    进入mysql:mysql -uroot -p

    输入密码:********

    查看secure-file-priv设置:show variables like ‘%secure%‘

    此时显示如下,secure_file_priv 的值为空:

    技术分享图片

 

     表示已修改成功。

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

原文:https://www.cnblogs.com/lovehansong/p/11764287.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!