Add [mysqld] in my.ini file of MySQL installation directory
secure_file_priv = ' '；Then run CMD as an administrator,
Enter MySQL / bin, stop the MySQL service net stop mysql, restart the MySQL service net start mysql,
mysql mysql -u root -p enter password: password
show variables like '%secure%';see
Note: Secure_ file_ Priv is the location where load data can be imported and exported.
Supplement: MySQL modifies secure in the configuration file my.ini_ file_ Priv does not take effect
There are three ways to modify export file address settings by mysql
secure_file_privNull prohibits exporting files
secure_file_privThe specified address limits that the export address can only be here
secure_file_privIf it is empty, it can be exported to any file
This configuration can only be modified in my.ini,
Encountered before changing secure in my.ini_ file_ Priv = changing to various formats will not take effect
I struggled all night and found a solution after research
The administrator CMD enters the DOS command interface
Enter MySQL — help to view the limited folders of MySQL read files
Move the modified my.ini file to one of the folders
Net stop mysql, net start MySQL restart the service and log in
show variables like “%secure%”; You can see success
Supplement: the MySQL configuration file my.ini does not work
First, you should know which my.ini is running.
Most of my.ini is located in the root directory of the MySQL installation directory.
Check the configuration file of which folder is started under your MySQL service in the service
As shown in the figure, go to the correct directory to find the running file.
There are two solutions:
Recommend the second handle, simple and rough.
1. Change the path above to your own path of my.ini. (it should be modified under the registry)
2. Directly find the file in the directory above, copy your configuration file to the directory or modify it directly.
(the program data folder is hidden by default. Just check show hidden folders in the folder option)
The above is my personal experience. I hope I can give you a reference, and I hope you can support developpaer. If you have any mistakes or don’t consider completely, please don’t hesitate to comment.