Installation and uninstallation of MySQL

Download the official website https://www.mysql.com/

Switch to the download tab page

Insert image description here

Find MySQL Community Server or MySQL Community (GPL) Downloads --> MySQL Community Server

Insert image description here
Insert image description here

Insert image description here
Click the download button:
Insert image description here
Click download to enter the download page and select No thanks, just start my download to start downloading.
Insert image description here

Download completed and install

Open the installation package and click Next
Insert image description here
Insert image description here
Insert image description here
to configure:
Insert image description here

Insert image description here

Set password and confirm password, both are set to root here
Insert image description here

The service name is the default and
Insert image description here
permissions are granted.
Insert image description here
Insert image description here
Insert image description here

Insert image description here

Insert image description here
Insert image description here
The installation is complete
Insert image description here

After the installation is complete, open cmd and check whether the installation is successful.

Open cmd as an administrator and enter the command mysql -u root -p. The access password will be set. The password set during the installation above is root. You can see the output welcome to the mysql..., indicating that we have successfully installed it.
Insert image description here
If you enter the mysql -u root -p command and it shows that mysql does not exist or cannot be found, you can check whether the environment variables are not configured:
This computer – right-click Properties – Advanced system settings. Click
Insert image description here
on environment variables
Insert image description here
. Click on the path in the system variables
Insert image description here
in the computer. Find C:\Program Files\MySQL\MySQL Server 5.7\bin
Insert image description here
and configure everything in the environment variables
Insert image description here
, click OK, close the environment variable configuration window, then open cmd as an administrator, enter the command mysql -u root -p and see again Is it successful? If it still doesn't work, uninstall and reinstall.

uninstall

You can see that it has been downloaded to C:\ProgramData\MySQL. Generally, ProgramData is a hidden directory. You can see it by manually opening the hidden directory.
Insert image description here

Find Control Panel-Program Uninstall

Insert image description here
Find mysql, right-click to uninstall it
Insert image description here
Insert image description here

Manually delete the C:\ProgramData\MySQL folder to completely uninstall it.

Insert image description here
Note: Be sure to uninstall cleanly, otherwise mysql cannot be reinstalled.

Guess you like

Origin blog.csdn.net/Sunshinedada/article/details/132342732