2021Mysql8.0 installation tutorial is super detailed

2021Mysql8.0 installation tutorial is super detailed

Official website download

1 Official website address:
https://dev.mysql.com/downloads/mysql/
2 Click the red box to go to the download page
Insert picture description here
3 Choose a 64-bit downloader, the one with the larger memory I downloaded directly here, can be installed offline after downloading
Insert picture description here

4 Don’t choose to log in, download directly (see arrow)
Insert picture description here

installation

5 After the download is complete, double-click the file you just downloaded, select Custom, and then click next.
Insert picture description here
6 Expand the left frame until it is consistent with the picture, click the option at the end of the branch, use -> to add it to the right, and add Tick ​​all the boxes on the right, click next
Insert picture description here
7 click excute
Insert picture description here
8 prompt to install vc++, just follow the prompt to install it (if not, go to the next one)
Insert picture description here
9 click Executive
Insert picture description here
10 click next
Insert picture description here
11 click next
Insert picture description here
12 click next
Insert picture description here
13 click next
Insert picture description here
14 click Enter the password as shown in the figure and repeat it once, click next
Insert picture description here
15 click next
Insert picture description here
16 click Executive, wait for all the tasks in the circle to be configured
Insert picture description here
17 configuration is complete, click finish
Insert picture description here

18 Click next
Insert picture description here
19 Click finish and
Insert picture description here
click Finish, Mysql is installed.

Environment configuration

1 Right-click on this computer-Properties-Advanced System Settings-Environment Variables
Insert picture description here
2 Find Path in System Variables
Insert picture description here
3 Edit-New, find the installation path of Mysql, here is C:\Program Files\MySQL\MySQL Server 8.0\binInsert picture description here

Insert picture description here
4 Create a new environment variable, copy and paste the installation path, and confirm
Insert picture description here

5 Open cmd as an administrator (search cmd in the computer search bar and run it as an administrator)
Insert picture description here
6 Enter:

cd C:\Program Files\MySQL\MySQL Server 8.0\bin

Use cd to change the path to the path where Mysql is installed.
7 Enter:

mysqld -install

When Service successfully installed. appears, the installation is successful.
Insert picture description here
8 Initialization
Create a txt file on the desktop or elsewhere, and rename the file to my.ini as an initialization configuration file. Enter the following:

[mysqld]
basedir=C:\Program Files\MySQL\MySQL Server 8.0
datadir=C:\Program Files\MySQL\MySQL Server 8.0\data
port=3306

Click save. Then add this file to the mysql server 8.0 folder (that is, add the file at the same level as the bin in the previous step). (*If your 3306 port is occupied, change another port.)
Insert picture description here
9 Continue to enter the command line in the bin directory:

mysqld --initialize --console

Initial configuration After the
Insert picture description here
configuration is completed, the random password pointed to by the arrow above will appear.
Enter net start mysql to connect to mysql, and there is an error that cannot be started.
Insert picture description here
Here you can refer to my previous blog to solve it.
net start mysql MySQL service is starting. MySQL service could not be started. The service did not report any errors. It's
actually very simple. Find the pid corresponding to the port and end it in the task manager!
Insert picture description here
Started successfully.
Here is the end of mysql installation and environment configuration! Start using it happily!

Guess you like

Origin blog.csdn.net/qq_43511299/article/details/112648004