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

show variables like '%secure%';
将文件导出路径更改为查询到的secure-file-priv路径下
select * from table where column = 'query' order by id limit 0,10 into file secure_file_path + file_name.csv;
reference

原文地址:https://www.cnblogs.com/vickey-wu/p/8532320.html