Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
According to the wrong information, we found that secure-file-priv will specify the folder as the place where the exported files are stored, so we can find this folder first.
Solution 1:
enter the following command in the MySQL command line interface:
show variables like '%secure%';
Annotated is the correct file path, we will export files in this directory.
For SQL instructions, modify as follows:
SELECT * FROM User details WHERE gender='male'
INTO OUTFILE 'C:\\ProgramData\\MySQL\\MySQL Server 5.7\\Uploads\\man.txt'
The file can be successfully exported to this directory.
Solution 2:
Go to the installation path C:\ProgramData\MySQL\MySQL Server 5.7, find my. Ini file and modify the default save path of Secure-file-priv.
Secure_file_prive =null — mysqld does not allow import and export
secure_file_priv=/ TMP/– limits the import and export of mysqld to only occur in the/TMP/directory
secure_file_priv= “” — does not restrict the import and export of mysqld
Read More:
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- [Solved] MYSQL Error: ERROR! MySQL server PID file could not be found!
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- [Solved] Starting MySQL… ERROR The server quit without updating PID file
- [Solved] Error Code: 2013. Lost connection to MySQL server during query
- MySql Warning: The server quit without updating PID file error
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- [Solved] MySQL Startup Error: The server quit without updating PID file
- Ubuntu ODBC MySQL 8 OPTION NOT Work [How to Solve]
- MySQL installation error: error while loading shared libraries: libaio.so .1: cannot open shared object file: No such