1. Download
https://dev.mysql.com/downloads/mysql/
2. Unzip, configure environment variables
MYSQL_HOME:D:\mysql
Add after path:%MYSQL_HOME%\bin
3.
Add the file my.ini file, data folder
[mysql] # Set the default character set of the mysql client default-character-set=utf8 [mysqld] #Set 3306 port port = 3306 # Set the installation directory of mysql basedir=D:\mysql5.7 # Set the storage directory for the data of the mysql database datadir=D:\mysql5.7\data # maximum number of connections allowed max_connections=200 # The character set used by the server defaults to the 8-bit encoded latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating new tables default-storage-engine=INNODB
4. Enter the bin folder of the installation directory , run CMD as an administrator, such as D:mysql\bin, then initialize the database and remember the assigned password
mysqld --initialize --user=mysql --console
5. Installation start
mysqld --install mysql
net start mysql
Note: If the msvcp120.dll file is missing from the system at startup, please download the C++ 2013 library
Address: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=40784
6. Change password
SET PASSWORD = PASSWORD('your password');