1. Download MySQL (Mysql official website address: https://www.mysql.com/ )
1. Enter the official website and click DOWNLOADS
2. Here we choose the community free version, which is enough for individual developers
3. Click MySQL Community Server
4. Select windows for the operating system, and then click go to download page
5. Here we choose the offline installation package (recommended).
The first is online installation and the second is offline installation
. 6. Select No thanks at the bottom, just start my download The download interface will pop up.
7. After the download is successful, there will be a mysql installation package in the specified directory.
2. Install MySQL
1. Click the downloaded mysql installation package to enter the mysql installer interface
- Select custom (you can choose the path or configuration yourself)
- click next
2. Select the MySQL Servers option has been pulled down
- Select MySQL Server 8.0.31 -x64 and click the green arrow
- The options are dragged over
3. Select the installation path
- Click the dragged mysql option (1)
- Then select the installation path (2) and click next
(1)
(2)
install Directory is the installation path of MySQL software,
and Data Directory is the path of MySQL database data storage
Note: If the following warning selection path already exists when selecting the installation path, it is because this folder already exists under this path (it is recommended to directly enter the name of the folder in the path to make it automatically generated) 4. Click Execute 5. Continue
to
next
6. Select Development Computer by default and then next
7. Select by default and click next
8. Enter the database password (you must remember it yourself)
9. You can modify the database service name (the default name is MySQL80 because the version is 8.0) and next
10. Continue next
11. Click Execute
12. All are green to indicate success and click finish to end
13. Next, the default next and finish end the MySQL installation
3. Configure environment variables
1. Right-click the computer properties (win11 as an example)
or open the computer and find properties in the upper toolbar
2. Select advanced system settings
3. Click environment variables
4. Select Path, and then click Edit
5. After entering the Path editing page, click New, and then add the bin directory under the MySQL software installation directory
Note: If you don’t know what address to enter, go directly to this computer to enter the MySQL bin directory, and then copy the current address
6. Then click OK, be sure to click, if you don’t configure it, turn it off
7. Press win+r, enter cmd, a command prompt will pop up, then enter mysql -u username-p password, press Enter
or mysql -u username-p, press Enter and then Enter the password,
mysql> appears, indicating that the environment variable configuration is successful