Home  >  Article  >  Database  >  What should I do if a 1290 error occurs in mysql?

What should I do if a 1290 error occurs in mysql?

coldplay.xixi
coldplay.xixiOriginal
2020-08-24 15:02:526128browse

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""].

What should I do if a 1290 error occurs in mysql?

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.

What should I do if a 1290 error occurs in mysql?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn