Solve the Problem of cocould not start the service MySQL error: 0 when installing and reinstalling mysql, mysqlcocould

Source: Internet
Author: User

Solve the Problem of cocould not start the service MySQL error: 0 when installing and reinstalling mysql, mysqlcocould

Cocould not start the service mysql error: 0
Cause:When you uninstall mysql, the related files and services are not completely deleted and need to be cleared manually.

The service cannot be started when the last execute step is installed.Solution:

First, stop the MySQL service in the management tools> Service (some services are not successfully installed, but stopped), win + R-> cmd, open the Command Prompt window, enter the command SC delete mysql (view the service, there is no mysql in the service), delete the stopped service, uninstall MySQL, and select remove. Finally, delete the MySQL installation directory and the database directory.

Enter regedit at the command prompt to open the registry.
In the Registry
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services
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
Delete the key mysql values (mysql and mysqladmin) in the relevant directory
MySQL related items in the registry may not be completely deleted. ctrl + F is used to search for mysql, F3 is used to find all related items of the MySQL software.

Note:(An error occurred while deleting the item ):
Unable to delete LEGACY_MYSQL51 (username set during database creation): An error occurred while deleting the item.
Solution:Right-click the registry entry to add all the permissions for administrators, and then open 360 security guard or Kingsoft guard to clear the registry!
Then, delete the MYSQL Data Table directory (C:/Documents and Settings/All Users/Application Data/MySQL Server 5.1/Data/) (Application Data is hidden, set it to display in view
Generally, Windows 7 uses the C: \ ProgramData \ MySQL directory. Note that the ProgramData folder is hidden by default ),

Finally, restart the computer, reinstall mysql, run the wizard Server Instance Configuration wizard, and perform relevant settings.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.