Mysql method to change the path of data saving: 1. Stop the mysql service; 2. Open the my.ini configuration file; 3. Find the datadir field and modify the saving path; 4. Execute the [net stop mysql] command to restart mysql service.
Specific method:
(Recommended tutorial: mysql tutorial)
1. Stop mysql Service
net stop MySQL
2. Make the following modifications in the my.ini file (mine is in the C:\ProgramData\MySQL\MySQL Server 5.7 directory):
3. Restart the mysql service
Enter the following commands in the command line as an administrator
net start MySQL
Related recommendations:php training
The above is the detailed content of How to change the path where data is saved in mysql. For more information, please follow other related articles on the PHP Chinese website!