Error: cannot create Windows Service for MySQL. Error: 0
Figure:
This problem occurs when you have not stopped and uninstalled an existing MySQL service and re-installed or upgraded MySQL using the MySQL Configuration Wizard. The reason is that when the Configuration Wizard tries to install the service, it finds that a service with the same name already exists.
One solution to this problem is to use the Configuration Wizard to select a service name other than MySQL. In this way, the new service can be correctly installed, but the original service is retained. But this is not good. It is best to unload old services that are no longer in use.
To permanently uninstall the old MySQL service, you can run the following command on the command line through the Management permission:
C:\>sc delete mysql
If SC is not available in Windows, you can download the delsrv tool from SC and use the delsrvmysql syntax.
There are some good methods on the Internet, which are as follows:
① Go to the control panel to delete the MySQL Installation File
② Go to computer-service to stop MySQL Service
③ Go to the directory you installed (drive C, drive D, etc., all deleted ):
1. MySQL installation directory, usually under the c: \ Program Files directory.
Ii. Mysql Data Storage Directory, which is generally in the C: \ Documents ents and Settings \ All Users \ Application Data Directory (note that the application data folder is hidden by default, you can choose tools> Folder Options> View> show all files and folders to hide files ).
3. Delete registry data and use Regedit to delete the following files:
Reference
HKEY_LOCAL_MACHINE/system/controlset001/services/EventLog/applications/MySQL
HKEY_LOCAL_MACHINE/system/controlset002/services/EventLog/applications/MySQL
HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/EventLog/applications/MySQL