1 Download the MySQL Zip package to extract to a directory that needs to be installed, such as D:\Local\mysql
2 Create directory data under D:\Local\mysql
3 copy My-default.ini to My.ini, modify My.ini configuration
Basedir = D:\Local\mysql
DataDir = D:\Local\mysql\data
4 Adding environment variables
Add the D:\Local\mysql\bin to the system variable Path
5 Run cmd as Administrator
Proceed to the D:\Local\mysql\bin directory, execute the following command and wait for completion, and finally a root temporary password is displayed.
Mysqld--initialize--user=mysql--console
6 Install MySQL for system service, start MySQL
mysqld install MySQL--defaults-file= "D:\Local\mysql\my.ini"
net start MySQL
7 connecting MySQL and resetting the root password
Log in to MySQL using the temporary password above
Log in after executing what commands are reported, this is required you to change the password
ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.
Modify Password procedure
SET PASSWORD = PASSWORD (' py123456 ')
ALTER USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;
Flush privileges;
Installing Mysql-5.7.xx-winx64.zip