The first step:
My Computer, properties, advanced environment variables
Select Path, after which you add: the path to your MySQL bin folder (e.g. C:\Program files\mysql\mysql Server 5.6\bin)
Path= ...; C:\Program Files\mysql\mysql Server 5.6\bin
Step Two:
Create a new My.ini file in the installation directory
==========================
[Client]
Default-character-set=utf8
[Mysqld]
Skip-grant-tables
Basedir= "E:/myfile/myjava/tools/mysql-5.7.22-winx64"
Datadir= "E:/myfile/myjava/tools/mysql-5.7.22-winx64/data"
port=3306
Character-set-server=utf8
============================
Step Three:
Create a new Data folder in the MySQL root directory and make sure data is an empty folder before installing
Input Mysqld--initialize
Then enter Mysqld--install
Success will show servers successfully installed
Under console input net start MySQL start MySQL service
Fourth Step:
Turn off MySQL. 2, run Mysqld--skip-grant-tables 3, open another command window to run MySQL can go to change the password
UPDATE user SET Authentication_string=password ("root") where user= "root";
Mysql-u root-p
MySQL Decompression version installation