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

**Linux Mysql没法备份文件
**

select  * into outfile  '/root/mess/MySQL/Uploads/student.txt' from student;

报错提醒
在这里插入图片描述
Linux怎么设置secure_file_priv权限
查看权限代码为:show variables like '%secure%';
原来的权限:
在这里插入图片描述
1.找到/etc/my.cnf
2.在在/etc/my.cnf的[mysqld]下面
(1)添加local-infile=0选项。[重启了发现没用]
(2)又加了secure_file_priv =
如图
在这里插入图片描述
3.关机,开机
在这里插入图片描述

cd /usr/local/mysql
service mysql stop 
service mysql start  

再查show variables like ‘%secure%’;

在这里插入图片描述


版权声明:本文为gemilov原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。