The solution to the 1290 error in mysql: first put the exported content file directly into the directory [/var/lib/mysql-files]; then delete the file after use, the code is [SELECT * from xxx where xxx into outfile""].
The solution to the 1290 error in mysql:
Today we need to retrieve data in an online environment, due to the amount of data Larger, use the into outfile
statement, but get the following prompt
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti on so it cannot execute this statement
to query the information, enter show variables link '%secure%';
to view the relevant configuration information, The obtained results are shown in the figure below.
The reference material is to change the configuration file of MySQL, but this is an online environment, and I still dare not do operations such as restarting or smooth restarting, so I exported the content file directly Place it in the directory /var/lib/mysql-files
and delete the file after use.
SELECT * from xxx where xxx into outfile "/var/lib/mysql-files/out.csv";
The problem has been solved and is hereby recorded.
Related learning recommendations: mysql tutorial
The above is the detailed content of What should I do if a 1290 error occurs in mysql?. For more information, please follow other related articles on the PHP Chinese website!