MySQL download, installation, configuration (version 5.7.19)

My computer is win7 64-bit system, and I will record the problems encountered in the installation of mysql5.7.19 version:

1: Download the compressed package
1. Download MySQL Community Server 5.7.19 from the MySQL official website , this version is a free version.
MySQL download, installation, configuration (version 5.7.19)  
Note: If you feel that the download on the official website is too slow, provide Baidu network disk sharing http://pan.baidu.com/s/1jIvFjIu
2. Unzip after the download is complete, and the folder after opening is as follows:
MySQL download, installation, configuration (version 5.7.19)  
Change the name of the folder mysql-5.7.19-winx64 to your liking, such as: mysql. I put the folder mysql to the E drive.
Two: configure mysql
Open the folder E:\mysql, create a new folder data, and create a new configuration file my.ini. The folder directory is as follows:
MySQL download, installation, configuration (version 5.7.19)
The configuration file my.ini adds the following content:
MySQL download, installation, configuration (version 5.7.19)
Three: install and start mysql
1. Open the cmd command line tool as an administrator, and cd to the bin directory E:\mysql\bin of the decompressed file
MySQL download, installation, configuration (version 5.7.19)
2. Enter mysqld install and press Enter to run, and then prompt that the installation is successful, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
3. Enter net start mysql and press Enter to run, and then prompt success, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)  
Note 1: If it prompts "System error 2 occurred", this is because the previous mysql uninstallation was not clean, and the registry needs to be changed
    (1) Press win+R and enter regedit, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)    
(2) Find the computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MySQL, right-click ImagePath to modify the value data to "E:\mysql\bin\mysqld" MySQL, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)      
Then find the computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\MySQL, right-click ImagePath to modify the value data to "E:\mysql\bin\mysqld" MySQL, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)    
(3) Enter mysqld install and press Enter to run, and then prompt that the installation is successful, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)    
(4) Enter net start mysql and press Enter to run, and then prompt success, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
  Note 2: If it prompts "MySQL service cannot be started", as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)    
Empty the data folder, enter mysqld --initialize, wait for a while, and then enter net start mysql, as shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
Four: Enter the mysql environment
1. After the MySQL service is successfully started, enter mysql -u root -p, and the prompt is as follows:
MySQL download, installation, configuration (version 5.7.19)
2. Modify the last line of the my.ini configuration file and remove the #. As shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
2. Enter net stop mysql to stop the mysql service, and then enter net strat mysql to restart mysql. As shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
3. cd to the bin directory, enter mysql -u root -p, prompt Enter password:, press Enter to enter the mysql environment. As shown in the figure:
MySQL download, installation, configuration (version 5.7.19)
4. Enter use mysql;
   Prompt Database changed
5.输入update user set password=password('123456') where user='root';
   提示ERROR 1054 (42S22): Unknown column 'password' in 'field list'
6.输入update mysql.user set authentication_string=password('123456') where user='root';
   提示Query OK, 1 row affected, 1 warning (0.00sec)
          Rows matched: 1 Changed: 1 Warnings: 1
7. Enter flush privileges;
   Prompt Query OK, 0 rows affected (0.01 sec)
8. Enter exit;
   Cue Bye
   Exit the mysql environment
MySQL download, installation, configuration (version 5.7.19)
9. Modify the my.ini configuration file again and restart the MySQL service.
10. After the MySQL service is restarted, enter mysql -u root -p and press Enter, and then enter the password you just set to enter the mysql environment.
11. Enter use mysql;
     提示ERROR 1820 (HY000): You must reset your password ...
12. Enter set password=password('123456');
     提示Query OK, 0 rows affected, 1 warning (0.00sec)
13. Enter flush privileges;
     Prompt Query OK, 0 rows affected (0.01 sec)
14. Enter use mysql;
     Prompt Database changed
MySQL download, installation, configuration (version 5.7.19)
15. Exit the mysql environment, enter mysql -u root -p and press Enter, and then enter the password you just changed to enter the mysql environment, no problem! ! !
MySQL download, installation, configuration (version 5.7.19)
 
Reference documentation:
http://www.cnblogs.com/lmh2072005/p/5656392.html#commentform
http://blog.csdn.net/brighter_xiao/article/details/51556532
http://blog.csdn.net/u010603691/article/details/50379282

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324460470&siteId=291194637