How to install mysql 5.7.11 in Win7, win75.7.11
Operating System: win7 64-bit flagship Edition
Mysql package: mysql-5.7.11-winx64.zip
1. decompress the MySQL package
Decompress the downloaded MySQL package to the custom directory. The decompressed directory is:
"D: \ Program Files \ mysql-5.7.11-winx64"
Copy the default file my-default.ini in the unzipped directory and change it to my. ini.
Copy the following configuration information to my. ini and save it.
# If there is no my-default.ini, you can create my. you can also obtain ################################# ###################### [client] port = 3306default-character-set = utf8 [mysqld] port = 3306character_set_server = utf8 # decompress the directory basedir = D: \ Program Files \ mysql-5.7.11-winx64 # extract data directory under the directory datadir = D: \ Program Files \ mysql-5.7.11-winx64 \ datasql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [WinMySQLAdmin] D: \ Program Files \ mysql-5.7.11-winx64 \ bin \ mysqld.exe
2. Add Environment Variables
The procedure is as follows:
1) Right-click my computer-> properties-> advanced system settings (advanced)-> Environment Variables
Click new Under System Variables
Input variable name: MYSQL_HOME
Input variable value: D: \ Program Files \ mysql-5.7.11-winx64
# This is the custom extract directory of mysql.
2) Select the Path in the system variable
Click Edit
Add the variable value; % MYSQL_HOME % \ bin to the variable value
Note that this variable is added after the original variable value and separated by;. The original variable value cannot be deleted.
3.
1) log on to the bin directory under the MySQL decompression directory from the console:
2) enter the service installation command:
1. mysqld -- console
2. mysqld -- initialize
3. mysqld install
After the installation is successful, a message is displayed, indicating that the service is successfully installed.
# Note: # Run these steps because the data folder does not exist in MySQL5.7.9. You need to use these commands to generate the data folder.
# The command for removing a service is mysqld remove.
4. Start the MySQL Service
Method 1:
Run the following command to start the service: net start mysql.
Method 2:
Open the management tools service and find the MySQL service.
Right-click Start or click Start on the left to start the service.
5. Modify the password of the root account
1. Modify the MySQL configuration file (my. ini) and add a line of skip-grant-tables under [mysqld ].
2. After mysql is restarted, you can directly use mysql-u root-p (the password is blank at this time)
3. mysql> update mysql. user set authentication_string = password ('123qaz') where user = 'root' and Host = 'localhost ';
4. mysql> flush privileges;
5. mysql> quit;
6. Restore the/etc/my. cnf file (delete the skip-grant-tables line) and restart mysql.
7. You can use mysql-u root-p '123qaz' to access
8. mysql> set password = PASSWORD ('20140901'); SET a new PASSWORD
Summary
The above is a detailed explanation of the mysql 5.7.11 installation tutorial for Win7 system. I hope it will help you. If you have any questions, please leave a message and I will reply to you in time. Thank you very much for your support for the help House website!