Install the MYSLQ database, install the MySQL Server Instance Config Wizard, and find that the service cannot be started in the last step. The prompt ” can not create windows service for
mysql.error:0 ” appears !
Cause: The cause of the error is mostly due to reinstalling mysql or upgrading mydql, using the MySQL Configuration Wizard. Simply put, you have installed it before, did not uninstall it clean, there are old mysql services in the system.
Use the sc delete mysql command in the DOS window.
First, stop the MySQL service in the Administrative Tools -> Services , then open cmd into your MySQL bin directory, for example C:\Program Files\MySQL\MySQL Server 5.5\bin and then use the following command mysqld-nt -remove Then it will show…success! Ok, let’s go to Add and Remove Programs, find MySQL and choose to uninstall, remember to select remove. Finally, the MySQL directory is deleted, and the database directory is also deleted.
Check if there is mysql in the service, if there is any service to stop it;
Run Add and Remove Programs in the Control Panel to uninstall mysql.
Open the registry after uninstalling, check the key value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, if there is related mysql key value (mysql, mysqladmin), delete it;
Restart, delete the mysql installation residual directory (view the service, there is no mysql in the service);
Reinstall mysql. Do not run the Server Instance Configuration wizard after installation. After restarting, run the wizard in the Start menu.
1. Start – MySQL-MySQL Server 5.5 – MySQL Server Instance Config Wizard-Next-Remove Instance.
2, enter the add remove program, find MySQL choose to uninstall, select remove.
3. Enter the registry.
3.1, view the key value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, if there is a related mysql key value (mysql, mysqladmin), delete it;
3.2, check HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\ under the mysql directory to delete.
3.3, check HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\ under the mysql directory to delete.
3.4, check HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services there is no Mysql key value, there is delete, you can.
3.5. Check if there is any Mysql key under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services, delete it.
3.6, check whether there are any Mysql key values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, there is delete, you can.
4. Delete the MySQL directory under the C:\Documents and Settings\All Users\Application Data directory.
5, enter the MySql installation directory, delete the directory.
You don’t need to restart your computer, just reinstall it.
Note: Before reinstalling MySql, it is best to back up the database. (win7 system opens Dos window to open as administrator)
After verification, it can solve this kind of problem.