1. log on to the mysql monitor command: cmd>Mysql-u root-pThen press enter to enter the password
2. the mysql configuration file is my. ini under the installation directory.
The slave database crashes directly, and the root user cannot log in. Resetting instance config directly causes an infinite number of failures at the start service... Finally, I tried to select remove existed instance in the first step of instance config, and then reset it again. At the end of the start, I was patient and finally recovered to normal .. OMG ~
3. Check the storage location of the database on the disk: mysql>Show variables like '% datadir % ';
Go to the directory under drive C to view (hidden folder). The data exists here, and each database corresponds to a folder,
My goal is to change this address to the data folder under the mysql installation directory of the E disk. I have read these two articles (Be sure to be careful, otherwise it will be easy to make mistakes ):
Http://blog.163.com/jerry78mu@126/blog/static/1310814462010113022546193/
Http://blog.csdn.net/dengqiaodey/article/details/7878886
The procedure is as follows:
- Copy all the folders in C: \ ''''' ''' \ data to the target location E: \ ''' \ data (do not delete the data files on drive C to avoid errors in future configuration );
- Open the my. ini file in the installation directory and find this line:Datadir = "C:/ProgramData/MySQL
Server 5.5/data /"
To:Datadir = "E: \ MySQL \ data", Pay special attention to "\" rather than "/", otherwise it cannot be successful (somehow !!!)
- Return all calls to mysql.exe. The task manager checks whether the MySQL service has stopped,
If not, run the following command in cmd:Net stop mysqlStop the service. ThenNet start mysqlRestart the service
- The database location is queried again.
1. log on to the mysql monitor command: cmd>Mysql-u root-pThen press enter to enter the password
2. the mysql configuration file is my. ini under the installation directory.
The slave database crashes directly, and the root user cannot log in. Resetting instance config directly causes an infinite number of failures at the start service... Finally, I tried to select remove existed instance in the first step of instance config, and then reset it again. At the end of the start, I was patient and finally recovered to normal .. OMG ~
3. Check the storage location of the database on the disk: mysql>Show variables like '% datadir % ';
Go to the directory under drive C to view (hidden folder). The data exists here, and each database corresponds to a folder,
My goal is to change this address to the data folder under the mysql installation directory of the E disk. I have read these two articles (Be sure to be careful, otherwise it will be easy to make mistakes ):
Http://blog.163.com/jerry78mu@126/blog/static/1310814462010113022546193/
Http://blog.csdn.net/dengqiaodey/article/details/7878886
The procedure is as follows:
- Copy all the folders in C: \ ''''' ''' \ data to the target location E: \ ''' \ data (do not delete the data files on drive C to avoid errors in future configuration );
- Open the my. ini file in the installation directory and find this line:Datadir = "C:/ProgramData/MySQL
Server 5.5/data /"
To:Datadir = "E: \ MySQL \ data", Pay special attention to "\" rather than "/", otherwise it cannot be successful (somehow !!!)
- Return all calls to mysql.exe. The task manager checks whether the MySQL service has stopped,
If not, run the following command in cmd:Net stop mysqlStop the service. ThenNet start mysqlRestart the service
- The database location is queried again.