Download link: https: //pan.baidu.com/s/1uPbBknyIebQRDt4k_RA58Q extraction code: 14zi
- Download the file to decompress it, I unpack location: D: \ Program Files \ mysql-5.7.28-winx64
- In D: \ Program Files \ created my.ini file mysql-5.7.28-winx64, the required contents of the file my.ini MySQL installation services
-
[mysql] # Mysql client to set the default character set default-character-set=utf8 [mysqld] Set # 3306 Port port = 3306 # Set the mysql installation directory basedir=D:\Program Files\mysql-5.7.28-winx64 # Set the data storage directory of mysql database datadir=D:\Program Files\mysql-5.7.28-winx64\data # Maximum number of connections allowed max_connections=200 # Server default character set used for the 8-bit coded character set latin1 character-set-server=utf8 The default storage engine that will be used when creating a new table # default-storage-engine=INNODB
File mentioned basedir and datadir:basedir: refers to the MySQL root directory;datadir: worth is followed by data in the database storage directory, you need to create data folder in the MySQL root directory (the directory location can be created according to their actual ideas, but in the configuration file needs to be consistent) - Configuring the system environment variables
-
In the computer configuration, the system environment variable to add, MYSQL_HOME: D: \ Program Files \ mysql-5.7.28-winx64Add in the back path;% MYSQL_HOME% \ bin
- Initialize the database
-
Open cmd.exe, must be run as an administrator, as it has been configured environment variable, the following command is executed successfully:mysqld --initialize --user=mysql --console
- The red flagged as the default password created "A Generated IS the Temporary password for root @ localhost: 8U, O /: Vkdu4K "
- Installing MySQL backend service
- net start MySQL57
- The first landing and modify the password
- With the initial password: mysql -u root -p
-
After the successful landing, using show databases; command can not be found, suggesting the need to reset the password:set password for root @ localhost = password ( "your password")