Windows install mysql5.7 to solve the problem of MSVCP120.dll missing

Download the zip package of mysql5.7 from the mysql official website. The detailed steps are as follows

If it is mysql8 by default, click here to download other versions

Then came to the download of mysql5.7 version, directly select this 64-bit click to download

Unzip the downloaded zip package directly to the location to be installed

The default download is without the my.ini configuration file, directly enter the bin directory and execute the following instructions

mysqld --initialize-insecure

If you have the following tips, you can use 360 ​​Software Manager to search as follows:

After installing the running environment and executing this command again, if there is no error, you can see the initialization except for the data folder, as follows

Then execute

mysqld install

Not surprisingly, it will prompt that the service is installed successfully, and you can see the mysql service in the windows service list

To open the service more quickly, you can win+r and enter services.msc

Also, if the installation is not successful, usually the command line (CMD) is not run as an administrator, you can directly press win and then directly enter cmd, right click to run as an administrator

Then enter the bin directory again and execute the command again. At this point, mysql5.7 is successfully installed as a service. Next, you need to start mysql, then set the root password, and click Start directly in the service.

Then enter the bin directory and execute

mysql -uroot -p

The default is no password, so when prompted to enter the password, hit enter again to enter

Then directly execute

alter user'root'@'localhost' identified by'root';

Change the mysql local access password to root,

So far, mysql5.7 has been downloaded and installed as a system service. You can execute the following command again to start mysql remote access

use mysql;
GRANT ALL PRIVILEGES ON *.* TO'root'@'%' IDENTIFIED BY'root' WITH GRANT OPTION;

Friends who need linux to install mysql 5.7 can follow my follow-up post!