How to recover after the computer re-loading system Mysql Database
One, "Set the path of MySQL"
For example: My MySQL in: D:\DataBase\mysql-5.7.13-winx64, you can re-create an environment variable in the environment variables mysql_home, the variable value is the MySQL installation directory
Then, the variable value in path is added;%mysql%\bin; ,
Second, "Testing"
Win+r, enter cmd, pop up the command Line window, enter the MySQL admin–v, if the following information appears, the configuration environment variable success!
Iii. "Changing Basedir and DataDir"
This step, mainly for you now the MySQL installation directory and before the change, if there is no change, input mysqld start MySQL after the other open a command line window, enter: mysql–u [user]–p [password] can login to MySQL, Then use show databases to find the database table or the original table! There's no change.
If unfortunately, you changed your MySQL installation directory, also very simple, in the MySQL installation directory has a file: My.ini
Open it
The discovery directory or the previous installation directory and database directory, you need to manually change to the current directory, if you do not have this file can be copied a copy of My-default.ini and renamed to My.ini, and then modify the corresponding content.
Iv. "Ultimate Test"
This is open command window, enter mysqld start MySQL after open additional window input mysql–u [user]–p [Password]
Connection Successful!
V. "Registering MySQL to system service"
This step, can do not do, if your MySQL is only used for personal play, there is no need, if it is as a server, or register as a system service, so when the system started to open the service, also very simple, open a command window, enter: mysqld install it! Open the service, found a more MySQL service, registration service success!
How to recover MySQL database after computer reload system