1. 导出文件报错
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
![](https://img.haomeiwen.com/i4380343/2afe0697e72068fe.png)
原因:
MySQL 的 “--secure-file-priv”选项设置问题
解决:
(1)查看 “--secure-file-priv”
![](https://img.haomeiwen.com/i4380343/9ff47b8a9b01a6fb.png)
(2) 将文件导出到该文件夹下面即可
SELECT * FROM tablename INTO OUTFILE '/var/lib/mysql-files/file.csv';
网友评论