Get the App
SLTechnology News&Howtos  ›  Database  › 

How to completely uninstall and reinstall MySQL under win10

Shulou Source: shulou.com Published: 2022-06-01 19:18:01 10月16日 Update

The following is about how to completely uninstall and reinstall MySQL under win10. The secret of the text lies in being close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on how to completely uninstall and reinstall MySQL under win10.

Step 1: stop the service

Start cmd- > enter services.msc- > find mySQL- > stop the SQL service

Step 2: delete the file

Find your installation directory and delete all files

Step 3: delete the registry

Start cmd- > enter regedit- > search for mySQL, and right-click to delete all (or find MySQL according to the following path, right-click to delete)

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

Step 4: configure the my.ini file

The version downloaded by the author is mysql-5.6.17-win32,zip archive, which is stored on disk D.

Create a new my.ini file in the D:\ mysql\ mysql-5.6.17-win32\ directory and write the following code:

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 3306 # set mysql installation directory basedir=D:\ mysql\ mysql-5.6.17-win32 # set mysql database data storage directory datadir=D:\ mysql\ mysql-5.6.17-win32\ data # maximum number of allowed connections max_connections=200 # the character set used by the server defaults to 8 bits Encoded latin1 character set character-set-server=utf8 # default storage engine default-storage-engine=INNODB to use when creating new tables

Note that the directory address should be replaced with your own mySQL storage address.

Step 5: install

Open cmd (pay attention to running as administrator)-> enter cdD:\ mysql\ mysql-5.6.17-win32\ bin

If you enter mysqld install, the following error occurs:

Prompt that the service has been installed.

So, next we need to continue typing mysqld-remove

The prompt instruction ran successfully.

Re-enter mysqld install:

Reinstall successfully!

Enter net start mysql:

Prompt started successfully.

For the above win10 changes how to completely uninstall and reinstall MySQL-related content, is there anything you don't understand? Or if you want to know more about it, you can continue to follow our industry information section.

Tags: Input directory file service success character character set prompt address data run maximum next following subject code content place secret customer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Shulou Information NVidia Linux