# Check the default location of secure_file_priv
SHOW VARIABLES LIKE "secure_file_priv";
# Save the file in that location
Select ... From ... INTO OUTFILE ...
# MySQL server is running with the –secure-file-priv
[mysqld]
secure-file-priv = ""
SHOW VARIABLES LIKE "secure_file_priv";