Fixed mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement when executing 'SELECT INTO OUTFILE'

To solve the problem:

mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it cannot 
execute this statement when executing 'SELECT INTO OUTFILE'

you can run

SHOW VARIABLES LIKE "secure_file_priv";

and use the folder you are told there as the output folder in your mysqldump command.

Example:

mysql> SHOW VARIABLES LIKE "secure_file_priv"\G;
*************************** 1. row ***************************
Variable_name: secure_file_priv
        Value: /var/lib/mysql-files/
1 row in set (0.00 sec)

Comments

Popular posts from this blog

How to get Active Transactions and Locks from MySQL

Example of a PAC file