数据库知识点MySQL

mac__MySQL导出数据遇到secure-file-priv

2018-03-21  本文已影响11人  tobbyvic
cyclist-3202481_640.jpg
ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement.

这个时候在网上查了一下,需要通过指令看一下secure-file-priv的配置

show variables like '%secure%';

看到为null


image.png

在网上查了一下需要在my.cnf中更改secure-file-priv的配置

/usr/local/etc/my.cnf

打开编辑


image.png

果然没有secure-file-priv的配置,然后在网上看了一下,要在mysqld下面更改,注意!!要在mysql.server stop之后才能更改保存,就更改为这样子:

image.png
最后再mysql.server start
show variables like '%secure%';
image.png

成功了!!!!
如果对大家有帮助的话,记得点个赞哦~~

上一篇 下一篇

猜你喜欢

热点阅读