MySQL installation

1. Decompress the installation package and place it in the desired disk folder

2. Open the folder, create a my.ini file, and copy the code content

[mysql] Set the default character set of mysql client default-character-set=utf8 [mysqld] Set port 3306 port = 3306 Set the installation directory of mysql Basedir =C:\\web\\mysql-8.0.11 Datadir =C:\\web\\ SQLDATA Max_connections =20 The default character set used by the server is latin1 character-set-server= UTF8 The default storage engine that will be used when creating new tables is default-storage-engine=INNODBCopy the code

3. Change the basedir line in the copy code. Replace basedir= with your MySQL file directory and datadir= with your database directory

1) If you can’t find the file extension, click View on the current page, check the file extension, and then change the file extension

2) The my.ini file

4. My. Ini configuration

Configuring environment Variables

This computer (my computer/computer) ==> right-click properties) or open control panel \ System and Security \ System

Advanced System Settings ==> Environment variables

5. Configure environment variables

Select Path from the system environment variable and click Edit to go to the edit environment variable window. Click New, paste your MySQL bin directory, and confirm the change

6. Copy paths to environment variables

Open the command line tool as administrator, CD your MySQL file in the bin directory.

7. Open the Powershell window

Initialize the database: mysqld –initialize –console

After initialization, there is a default root password: yte.4,scliro

8. Initialize the database

Install mysqld: mysqld install

9. Install mysqld

Net start MySQL

MySQL -u root -p

Set password for ‘root’@’localhost’=password(‘123456’); The text in the delete line is the password that needs to be replaced.

You can also change the password directly in the visual tool