When I reinstall MySQL, I encountered some problems. I found a solution on the Internet and summarized it as follows:
1. Before re-installing MySQL, you must uninstall and completely delete MySQL.
1. Uninstall the Control Panel first.
2. Delete the MySQL folder under drive C programfile/MySQL /.
3. Delete the configurations in the registry.
Open "start"-> "run"-> "Regedit"-> to enter the Registry
Click Edit in the Registry and enter "MySQL" (check the 'value' and 'data' to remove unnecessary search values ), find the mysql-related items and delete them;
(If the password is not completely deleted, the system will prompt you for the original password)
2. An error occurred while executing the second step of installation configuration.
Error: "configuration file tmeplate E: \ mysql5.1 Download \ mysql \ my-template.ini cocould not be processed and written toe: \ mysql5.1 Download \ mysql \ My. ini. Error code-1 ."
Solution: Because the directory is pure in ChineseCodeError. Therefore, you can set the directory to full English.
Iii. Solve the Problem of restoring data when the MySQL database is not backed up
1. Right-click my computer and choose manage> services> stop MySQL service.
2. Delete the data folder after reinstallation
3. Copy the previously installed data folder to the corresponding directory (copy and save the folder before uninstalling MySQL)
4. Delete two log files, ib_logfile0 and ib_logfile1.
5. Run MySQL and the data recovery is normal.