First, download MySQL
Go to MySQL official website download mysql Community Server, choose 64-bit, link is: https://dev.mysql.com/downloads/mysql/
Second, download the good compressed package, unzip to the specified location.
At this point, MySQL does not have the data directory and the My.ini file.
Third, configuration My.ini file
Create a new My.ini and enter the following:
#version: 5.7.21-winx64 [ mysql " #设置mysql客户端默认字符集default-character-set =utf8 [ mysqld #跳过权限检查 #skip-grant-tables #设置3306端口port = 3306 #设置mysql的安装目录basedir = d:\mysql# set the data storage directory for the MySQL database datadir =d:\mysql\ data# Maximum number of connections allowed max_connections =200# The character set used by the service side defaults to the 8-bit encoded latin1 character set Character-set-server =utf8# Default storage engine that will be used when creating a new table Default-storage-engine =innodb
My.ini x64
IV. Configuring environment variables
Add Mysql_home in the system variable, the value of the variable is the location of the decompression of MYSQL, and then add it in Path ;%mysql_home%\bin , click OK.
Enter the command prompt as an administrator,
install MySQL :   mysql-install ( in the bin directory of the MySQL decompression location )
Initialize MySQL: mysqld-initialize (need to create a data directory first)
Start mysql:net start MySQL
Vi. entering MySQL
Not yet, you need to modify the My.ini, the directory under the "Mysqld" under the Skip-grant-tables uncomment, and then restart the MySQL service.
Next, enter the following instruction
SET PASSWORD = PASSWORD ('your new PASSWORD ');
ALTER USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;
Flush privileges;
And then comment out the My.ini file under [mysqld] skip-grant-tables
The equivalent of skipping permission checks, then setting the permissions again, and then turning on permission checking.
Seven, log in MySQL
I got into MySQL as root.
Win7x64 How to install and configure the MySQL database?