In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, a netizen asked, I encountered 1290 of the errors when backing up with mysqldump. Here is the error message I simulated.
[root@potato Desktop] # mysqldump-uroot-proot-S / tmp/mysql.sock-- tab=/data/mysql/mytest_3306/data/backup lala Warning: Using a password on the command line interface can be insecure. Mysqldump: Got error: 1290: The MySQL server is running with the-- secure-file-priv option so it cannot execute this statement when executing 'SELECT INTO OUTFILE'
You can clearly see from the prompt that it cannot be executed because the mysql service is enabled-- secure-file-priv. So-- what is secure-file-priv and how to solve it so that it can be backed up? Secure-file-priv=name: Limit LOAD DATA, SELECT... OUTFILE, and LOAD_FILE () to files within specified directory can see that the secure-file-priv parameter is used to restrict LOAD DATA, SELECT. OUTFILE, and LOAD_FILE () to which specified directory. When the value of secure_file_priv is null, mysqld is not allowed to import | Export when the value of secure_file_priv is / tmp/, it means to restrict the import of mysqld | Export can only occur in the / tmp/ directory. When the value of secure_file_priv has no specific value, it means that the import of mysqld is not restricted | Export is not restricted.
View the current value of this parameter in the database, root@localhost:mysql.sock 00:14:52 [(none)] > show global variables like'% secure%' +-+-+ | Variable_name | Value | +-+-+ | secure_auth | ON | | secure_file_priv | NULL | +-+-+ 2 rows in set (0.00 sec)
You can clearly see that the value of secure_file_priv is NULL, indicating that the import and export is restricted at this time, so you should change this parameter. However, if you look at the fact that this parameter is not set in mysql.cnf, it means that this parameter defaults to null, so [mysqld] in mysql.cnf adds secure_file_priv = restart the mysql service.
Then check again the value of the parameter root@localhost:mysql.sock 00:28:30 [(none)] > show global variables like'% secure%' +-+-+ | Variable_name | Value | +-+-+ | secure_auth | ON | | secure_file_priv | | +-+-+ 2 rows in set (0.00 sec) is already the desired result
Start exporting [root@potato Desktop] # mysqldump-uroot-proot-S / tmp/mysql.sock-- tab=/data/mysql/mytest_3306/data/backup lala Warning: Using a password on the command line interface can be insecure. You can see the success.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.