Mysql installation and configuration

One:

Download URL: mysql8, then click "No thanks, just start my download." at the bottom to start downloading

two:

Decompress it directly to any folder, after decompression, the following two files will not be found.
Insert picture description here

Create a txt file in this directory and change the suffix to ini.

The contents of the file are as follows:

tips: Three or four lines of the installation address, can be modified according to the actual storage location

[mysqld]
port=3306
basedir=E:\Application\Mysql\mysql-8.0.11-winx64
datadir=E:\Application\Mysql\mysql-8.0.11-winx64\data  
max_connections=200
max_connect_errors=10
character-set-server=utf8
default-storage-engine=INNODB
default_authentication_plugin=mysql_native_password

three:

Add the bin directory in the environment variable-system variable-Path
Insert picture description here


Insert picture description here

four:

Run cmd as an administrator and enter the bin directory
Enter the following commands in sequence
mysqld --initialize --console
Insert picture description here
mysqld --install
Insert picture description here
net start mysql
Insert picture description here
After the above operations are completed, you can choose one of the following ways to change the password
alter user ‘root‘@’localhost’identified with mysql_native_password by ‘新密码’;

ALTER USER [email protected] IDENTIFIED BY "新密码";

set password for [email protected] = password(‘新密码’);

update user set Password=password("新密码") where User='root';
Installation and configuration is complete, you can start to use mysql
Insert picture description here