The MySQL server is running with the --secure-file-priv option

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq6759/article/details/84873598

ERROR 1290 (HY000) at line 1: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

SELECT * INTO OUTFILE

ERROR 1290 (HY000) at line 1: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

执行SELECT * INTO OUTFILE的时候报这个错误

Mysql版本

 查看一下secure_file_priv的数值

show variables LIKE '%secure_file_priv%';

NULL 表示限制mysql 不允许导入或者导出

修改mysql配置文件my.cnf 或 my.ini,在[mysqld]内添加

secure_file_priv = 

(secure_file_priv的值没有具体值时,mysqld的导入或导出不限制文件目录)

或者

secure_file_priv = 指定目录 (限制mysqld 的导入或导出只能在指定目录下)

重启mysql,再次查看

ok

猜你喜欢

转载自blog.csdn.net/qq6759/article/details/84873598