Table of contents
MySQL 8.0.32 official website download and installation tutorial
The first step (official website download and install)
The third step (configure environment variables)
The fourth step (check the installation)
Step 1: Stop the MySQL service
Step 2: Uninstall the software
Step 3: Cleanup of residual files
Step 5: Delete the environment variable configuration
MySQL 8.0.32 official website download and installation tutorial
This article is aimed at beginners who are learning mysql database, and only detailed basic configuration is carried out.
The first step (official website download and install)
Download and install the assistant on the official website , the recommended Installer is used here
————————————————————
1. Select the corresponding operating system, click Go to Download Page, and jump to the download Interface
2. Click to download
Step 2 (execute installation)
Open the downloaded installer and install it
—————————————————
1. Here, only the MySQL server is installed
2. Click Execut
- Config Type select the default Development Computer,
the port number can be changed by yourself (it is recommended to use the default port number)
and click Next
4. Select the recommended password and click Next
5. Set the password of the root user (you can choose to
Add User
add other accounts) here we set it to 123456
6. Change the service name to
MySQL
facilitate later calls
7. Click Execute to complete the installation.
The third step (configure environment variables)
- Find the bin folder of the MySQL installation, copy the path (the default is
C:\Program Files\MySQL\MySQL Server 8.0\bin
)
2. Start the interface to search for environment variables and open the option
3. Click in the system variable
Path
, click Edit
- Add the installation path and click OK.
The fourth step (check the installation)
Open the console and type the following command to test the startup of the database service:
net stop MySQL
#MySQL is the service name set before, andnet start MySQL
you can see the following prompt, that is, the service startup is successful
Type the following command to log in to MySQL:
mysql -u root -p
(Enter the password after pressing Enter)
After entering the password, the interface is as follows, that is, the login is successful.
Completely uninstall MySQL
Step 1: Stop the MySQL service
Before uninstalling, stop the service of MySQL8.0
Ctrl + Alt + Delete key combination, open the task manager dialog box, you can find the MySQL8.0 service in the service list, if it is now "running", you can right-click the service, select the "stop" option to stop MySQL8.0 Serve
Step 2: Uninstall the software
Method 1: Through the control panel method
To uninstall the MySQL8.0 program, you can directly select “Uninstall a Program” in the “Control Panel” like other desktop applications, and find the MySQL8.0 server program in the program list, double-click to uninstall
Method 2: Uninstall through the uninstall function provided by the installation package
①Double- click the downloaded mysql-installer-community-8.0.32.0.msi file to open the installation wizard, which will automatically detect the installed MySQL server program
②Select the MySQL server program to be uninstalled, click Remove to uninstall
③Click Next to confirm the uninstallation
④Whether to remove the data directory selection window pops up at the same time
If you want to delete the data in the MySQL server at the same time, check Remove the data directory
⑤Execute uninstallation, click Execute
⑥Complete uninstallation, click Finish
If you want to uninstall the installation wizard program of MySQL8.0 at the same time, check Yes, Uninstall MySQL Installer
Step 3: Cleanup of residual files
(1) Service directory: the installation directory of the mysql service
(2) Data directory: C:\ProgramData\MySQL by default
If the reinstallation is unsuccessful, you can uninstall and clean up the remaining files before reinstalling
Note: Please make a data backup before uninstalling. After the operation, you need to restart the computer before installing
If the installation still fails, you need to continue to the following step 4
Step 4: Clean the Registry
Type regedit in the search box of the system to open the Registry Editor
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL服务 目录删除
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\MySQL服务 目录删除
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL服务 目录删除
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\MySQL服务 目录删除
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL服务目录删除
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL服务删除
Step 5: Delete the environment variable configuration
Find the path environment variable and delete the environment variable about mysql
Remember not to delete all
If you don't understand or have any questions, please leave a message