The MySQL server is running with the — secure file priv option

Problem description: This error occurs when importing data:
Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it cannot execute this statement
Solutions:
Find the my.ini file in the MySQL installation path,
It is generally C disk or D disk, depending on your own installation, my as follows 🙂
D: \ ProgramData/MySQL/MySQL Server 5.7 \ my ini
Find the string “secure_file_priv” and set it to have no value:
secure_file_priv=
To explain,
Secure_file_priv null means that the mySQLD restriction does not allow imports or exports.
secure_file_priv is C:\temp, which restricts mysqld to import and export in the C:\temp directory and not to other directories. When
secure_file_priv has no value, it means that it can be imported or exported from any directory.
 
Then restart the MySQL service as follows:
Type “Services.MSC” into the taskbar search box, find MySQL, and restart it. OK.
 
 
 

Read More: