First, download the compressed package
Second, after decompression stored in the path
Third, configure environment variables
Add D:\Program files\mysql-8.0.11-winx64\bin to the user path variable or to the system path variable
Note: 1) If you add the user path variable, only the user can use the MySQL service
2) Add the system path variable, all users on this computer can use the MySQL service
Iv. Creating the Data folder
V. Create a My.ini file
The contents are as follows:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
# Set 3306 port
Port = 3306
# set up the MySQL installation directory
Basedir=d:\program files\mysql-8.0.11-winx64
# Set up a storage directory for MySQL database data
Datadir=d:\program Files\mysql-8.0.11-winx64\data
# Maximum number of connections allowed
Max_connections=20
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
Vi. generating files in the Data folder
Run cmd as administrator, enter D:\Program files\mysql-8.0.11-winx64, and execute mysqld--initialize-insecure--user=mysql
Seven, installation Services
Execute Mysqld-install command
Eight, login MySQL
Mysql-u root-p
Installing MySQL under Windows through a zipped package