
- 在mysql中导入文件时报错
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

在网上查了一下需要在my.cnf中更改secure-file-priv的配置
- 开始寻找my.cnf这个文件
文件路径在
/usr/local/etc/my.cnf
打开编辑

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

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

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