Everybody is good! As the saying goes, “To do a good job, you must sharpen your tools.” If you want to learn MySQL, of course, you need to synchronize both practice and theory. In order to go through the process of installing MySQL again, you need to delete MySQL first. However, during the process of uninstalling MySQL, I found that there are many articles in it.

Reason for unloading

Maybe too long no use, restart MySQL but found that the password can not be retrieved! At this time and can not find other way, can only reinstall, or is the version of the wrong, or like me to reinstall MySQL, have to restore their own computer to a new empty environment, the results you find simple delete, then again, found all kinds of error! That is your unloading position is not correct, need to complete unloading ~

Uninstall instructions

1. Shut down the MySQL server

Method 1: On the cli of the administrator terminal, run net stop mysql

Method 2: Go to Services > Stop the MySQL service. Use the Win+r shortcut key to enter services. MSC to go to the services screen, then right-click to shut down MySQL services, or as in step 4, click Stop services.

2. Access the Programs and Functions of the Control panel

Since I install MySQL using zip files, I don’t need to perform this step.

3. Delete the MySQL folder in the MySQL installation directory

Install MySQL in C:\other\develop\MySQL.

4. Access the registry editor and delete the registry

Press win+R, type regedit, press Enter (or hit OK) to open the registry editor.

  • Delete the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MySQL folder

  • Delete the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL folder.

  • Delete the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL folder.

If there is no corresponding folder, do not delete.

PS: Because of the different forms on different computers, it is recommended to use the way to find MySQL to delete one by one.

Delete the folder “C: ProgramData\MySQL”

Delete the C: ProgramData MySQL folder. If it shows that it is being used by other applications and cannot be deleted, you need to restart the computer to delete it.

6. Delete the System Variable path from environment variables

MySQL > delete system variables from MySQL

Finally, MySQL service may exist:

Sometimes after following all the steps of uninstallation, MySQL related services still exist in the service, so we should delete the related services. To do this, open the CMD command window as an administrator and enter sc delete mysql to delete related services.

MySQL8.0+ has been installed in MySQL8.0+.

This article is part of the “Gold Nuggets For Free!” Event, click to view details of the event