1.1.Download:
I downloaded the zip package for the 64-bit system:
: https://dev.mysql.com/downloads/mysql/
Download the ZIP package:
Unzip after download: D:\ Software installation package \mysql-5.7.20-winx64
1.2.To Configure environment variables:
Variable name: mysql_home
Variable Value: E:\mysql-5.7.20-winx64
Path added:%mysql_home%\bin;
1.3.generate the data file:Run cmd as administrator enter E:\mysql-5.7.20-winx64\bin under execute command: mysqld--initialize-insecure--user=mysql in E:\ Generate the Data directory under the Mysql-5.7.20-winx64 directory
1.4.Start the service:
Execute command: net start MySQL start MySQL service, if prompt: Invalid service name ... (there is a workaround = = step: 1.5);
1.5.SolveStart the serviceFailure (Error):Tip: Invalid service name workaround: Execute command: Mysqld-install (no My.ini configuration file required Note: Many online write needs My.ini configuration file, in fact, do not need My.ini configuration files can also, I placed the My.ini file, instead of prompting the service can not start, the My.ini deleted after the start of success) if it appears, you need to go to the resource manager to complete the MySQL process, restart can be.
1.6.LoginMySQL:
Log in to MySQL: (because the password is not set before, so it is empty, do not enter the password, direct return)
E:\mysql-5.7.20-winx64\bin>mysql-u root-p
Enter Password: ******
1.7.Query User Password:
Query User password command:mysql> select host,user,authentication_string from Mysql.user;
1.8.set (or modify) the root user password:
Set (or modify) the root user password:
mysql> Update Mysql.user Set Authentication_string=password ("123456") where user
= "Root"; #password ("123456"), where the contents of the quotation marks are passwords, you can set them casually
Query OK, 1 row affected, 1 Warning (0.00 sec)
Rows matched:1 changed:1 warnings:1
mysql> flush Privileges; #作用: Equivalent to save, after executing this command, the settings will take effect, if not executed, or the previous password does not change
Query OK, 0 rows affected (0.01 sec)
1.9.exit MySQL:
Mysql> quit
Bye
MySQL installation process