Decompress it directly to any folder, after decompression, the following two files will not be found.
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
Add the bin directory in the environment variable-system variable-Path
Run cmd as an administrator and enter the bin directory
Enter the following commands in sequence
mysqld --initialize --console
net start mysql
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';