[Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement]错误解决

时间:2022-06-07 18:09:08

1.配置文件中将这行注销“secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads" ”;很多人添加权限依然不行就是因为这行没有添加;

注意:加完后一定要重启mysql;

2.赋权限

grant all on proposaldb.* to root@'localhost' identified by 'zzzz2222.';

set global read_only=off ;/*set global read_only=0;*/

flush privileges;/* SET SESSION binlog_format = 'ROW'; SET GLOBAL binlog_format = 'ROW';*/

select LoginName from sysuser    into outfile 'e://output1.csv' fields terminated by ','optionally enclosed by '' lines terminated by '/n';