1, stop MySQL service, uninstall MySQL
2, delete the installation directory and data storage directory
Note:
Default installation path: C:\Program Files\mysql (not necessarily in the C drive to see which disk you are installing)
Database File storage directory:
Xp:c:\documents and Settings\All Users\Application Data\mysql
Win7/win8:c:\programdata\mysql (the directory is usually hidden and needs to be selected for display)
3, in the registry query MySQL, delete all (this step is critical, the main reason for the installation failure is the registry delete is not clean)
Here's how to completely delete the registry:
(1) Enter the registration form: Run >>regedit to the following interface (delete by method):
(2) Clean up the following three directories:
A. Hkey_local_machine\system\controlset001\services\eventlog\application\mysql
B. Hkey_local_machine\system\controlset002\services\eventlog\application\mysql
C. hkey_local_machine\system\currentcontrolset\services\eventlog\application\mysql
MySQL registry controlset001,controlset002, not necessarily 001 and 002, may be ControlSet005, 006 and the like, delete the time, all can be deleted;
4, Into the DOS window (Win7 and win 8 need to be in the Administrator's DOS window): sc delete mysql delete the original MySQL service, if the system has previously installed other environment such as PHP contains MYSQL service, it is recommended not to use, run net directly in the Run box The Stop MySQL command. (Windows + R input net stop MySQL return)
5, in the C disk query MySQL (May hide, show hidden files on the line), all deleted.
6. Restart the computer
7, reinstall MySQL, configure the process to select the unused name (MYSQL4, if you still use the original MySQL, you will not be able to start the service (previously removed MySQL service (executed SC delete MySQL can be used directly with MySQL) To set the MySQL service name in service name
Attention:
1. The Windows account used for installation is an administrator account and is installed as an administrator ( mainly win7, Win8)
The cleanest and most convenient way to uninstall MySQL (which means it took a long time to collect)