1) mysql5.7 binary software download
Download: https: //dev.mysql.com/downloads/mysql/5.7.html#downloads
download software: mysql-5.7.25-win64.zip
2) decompression software to the specified directory
d : \-MySQL 5.7.25
. 3) configure the environment variables and path
environment variable name: MYSQL_HOME is
path Add: path =% path%;%% MYSQL_HOME is \ bin
. 4) my.ini edit parameter file (add the following variables) and to save% % MYSQL_HOME is \ bin
[MySQL]
default = UTF8-Character-SET
[mysqld]
port=3306
D = the basedir: \ MySQL 5.7.25-
DATADIR = D: \-MySQL 5.7.25 \ Data
max_connections = 200 is
Character-Server-SET = UTF8
default = InnoDB-Storage-Engine
. 5) open command window and install MySQL
D: \ > cd d: \-MySQL 5.7.25 \ bin
d: \> mysqld install
- Note: If an error regarding MSVCR120.dll and MSVCP120.dll, the c: \ windows \ lack of these two files system2, needed from other two copies of the file system similar to the c: \ windows \ directory under system2, then run again mysqld install installation.
6) Initialize the database
D: \> CD D: \-MySQL 5.7.25 \ bin
D: \> mkdir .. \ Data
D:> = MySQL mysqld --user --initialize --console
- Note: being given that data directory is not empty, then the data directory and try the case, and note the root password screen.
7) to initiate a connection and modify the root password mysql
D: \> NET Start mysql
D: \> mysql -u root -Ppassword
mysql> alter user root@'localhost' identified by 'new_password';
mysql> flush privileges;
mysql> exit;