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

在MySQL执行数据导出时遇到以下报错,

16:06:16    SELECT * FROM actor into outfile 'e:/tmp/act.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\r\n'    Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement    0.000 sec

 经排查,是因为在选项中有设置智能从既定的目录上传下载,所以解决方式有两种,要么导出文件到既定的目录下,要么修改既定目录为新的目录(需要重启数据库)。

发布了123 篇原创文章 · 获赞 12 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/haiziccc/article/details/103701378