Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
When using select… Into output to export data, error 1290 (HY000) is reported. The statement is as follows:
select * into outfile 'd:\abc.txt'
fields terminated by ','
optionally enclosed by '"'
lines terminated by '\n'
from emp;
Error 1290 (HY000): the MySQL server is running with the — secure file priv option so it cannot execute this statement
analysis: prompt message – Secure File priv, it can be seen that the file export is restricted. So modify the restriction information in the configuration
Note:
secure_ file_ Prive = null restricts mysqld from importing and exporting
secure_ file_ Priv = “C/programdata/MySQL/MySQL server 8.0/uploads” restricts the import and export of mysqld to C/programdata/MySQL/MySQL server 8.0/uploads
secure_ file_ Priv = ”does not restrict the import and export of mysqld
solution:
I don’t want to restrict it, so the solution is to add secure to the MySQL configuration file_ file_ priv=’ ‘
1. Open the my.ini file of windows, my version mysql8.0, and the configuration file path is C:// programdata/MySQL/MySQL server 8.0/my.ini
2. Add secure under [mysqld] node of my.ini file_ file_ priv=”
3. Restart mysql8.0 service
Execute the export statement again
Similar Posts:
- [Solved] MYSQL Error [Error Code] 1290 – The MySQL server is running with the –secure-file-priv option
- [Solved] MYSQL Export Sheet Error: –secure-file-priv option so it cannot execute this statement
- [Solved] MySQL Import csv File[Error Code] 1290 – The MySQL server is running with the –secure-file-priv option
- MySQL import file prompt — secure file priv option problem
- How to Solve MySQL Secure file priv error
- [Solved] MYSQL ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot e…
- MySQL reports an error using load data local infile
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- mysql ERROR 1044 (42000): Access denied for user ‘
- How to Solve MYSQL Startup Error: “MySQL Daemon failed to start”