1. Download MySQL Community Server 5.7.13
Unzip the MySQL archive package
2. Modify My-default.ini
skip-grant-tables function is to install MySQL password-free login, and then you can change the root password.
3. Add Environment variables
The operation is as follows:
1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
Click the New button under System variables
Input variable name: mysql_home
Input variable Value: D:\ProgramFiles\mysql-5.6.11-winx64
#即为mysql的自定义解压目录.
2) Select path in the system variable
Click the Edit button
To add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and cannot delete the original variable value.
4. Registering MySQL as a Windows system service
1) from the console (running as administrator) into the bin directory under the MySQL decompression directory:
2) Enter the Service installation command: mysqld install mysql--defaults-file= "C:\java0822\mysql-5.7.13-winx64\my-default.ini"
#解压目录下修改的my. ini file
A successful installation will prompt the service to install successfully.
#注: The My.ini file is placed in the root directory after MySQL decompression
#移除服务命令为: Mysqld Remove
5. Start the MySQL service
Method One:
The Start service command is: net start MySQL
Method Two:
Open the Administration Tools service and locate the MySQL service.
Start the service by right-clicking to start or by tapping on the left-hand boot directly.
6. Change the root password: update MySQL. User Setauthentication_string=password (' root ') where user= ' root ';
# Newly installed MySQL5.7, prompt password error at login, no password change when installing, later change password by password-free login, enter update Mysql.user setpassword=password (' root ') where user= ' Root ' Prompt error 1054 (42S22): Unknown column ' password ' in ' FieldList ', originally there is no password this field under the MySQL database, The password field is changed to Authentication_string
7. Stop MySQL Service
Modify the My-default.ini file, comment out Skip-grant-tables
8. Start the MySQL service.
Reference Links:
http://blog.csdn.net/q98842674/article/details/12094777
http://blog.csdn.net/u010603691/article/details/50379282
Mysql-5.7.13-winx64 Install-free version configuration method