Home  >  Article  >  Database  >  How to change the path where data is saved in mysql

How to change the path where data is saved in mysql

王林
王林Original
2020-09-29 14:17:137038browse

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.

How to change the path where data is saved in mysql

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):

How to change the path where data is saved in mysql

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn