ERROR 1290 (HY000) : The MySQL server is running with the –secure-file-priv option so it cannot execute this statement. I believe that most students who perform MySQL data export operations for the first time will encounter the above errors. As for why this error occurs, the reason is very simple: we don't know where the default export directory of MySQL is, and we don't even know that MySQL has restrictions on the export directory of data. This is actually normal, because it is impossible for us to know everything. As long as we can find the correct solution and remember it after encountering a problem, it is enough! Learning is a process of continuous accumulation. Next, let's take a look at how to solve this problem: After we install MySQL, a configuration file named my.ini will be automatically generated. This file records all the default configurations of MySQL, such as port number, default character set, default storage engine, and so on. This configuration file is located in the hidden folder ProgramData. For details on how to find this hidden folder, please refer to the detailed method for viewing the storage location of MySQL data files. In addition, we can also view the current value of secure-file-priv through the command: show variables like '%secure%'; Execute the above command to test: As shown in the figure above, the secure-file-priv value I set is D:/CoderLife/testMySQL, and the default value of MySQL is: secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads" We can view and modify it by opening the my.ini configuration file: As shown in the figure above, I commented out the default value of MySQL and changed it to my own specified path. In fact, after we modify the contents of this configuration file, such as changing the default value of secure-file-priv, we must shut down MySQL and restart it to make it take effect. Here, we need to pay attention to the following: shutting down MySQL does not mean simply exiting MySQL with the exit command or closing the MySQL window, but shutting down the MySQL service and then restarting the service . As for how to start and stop the MySQL service, please refer to the detailed description of the MySQL database crash after entering the password and the solution. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Solution to the problem that the virtual machine Ubuntu 16.04 cannot connect to the Internet
>>: Solution to the problem that Ubuntu cannot connect to the Internet in the virtual machine
Ideas It's actually very simple Write a shell...
The reason is this I wanted to deploy a mocker pl...
Preface The delay of MySQL master-slave replicati...
VirtualBox is a free and open source virtualizati...
Definition of Float Sets the element out of the n...
Table of contents Purpose npm init and package.js...
Table of contents 1. Structure string 2. Return t...
1. First, generate the public key and private key...
1. Basic syntax structure of HTML submit and bott...
The following attributes are not very compatible w...
Basic structure: Copy code The code is as follows:...
I have previously written an article about file t...
When a company builds Docker automated deployment...
Table of contents Preface 1. Basic Data 2. Inheri...
①. How to use the alias (CNAME) record: In the do...