On the Internet to read the east of the great God of things copied West copy copy, always wrong, because a lot of information is not for 5.7 of this version of the content.
First unzip the file, such as I unzip to D:\Program files\mysql-5.7.21-winx64
The first step: Create My.ini, unpack the package is not from this file, so only created by themselves, the following is a copy on the Internet
[Mysqld]
Character-set-server=utf8
#绑定IPv4和3306端口
Bind-address = 0.0.0.0
Port = 3306
# set up the MySQL installation directory
Basedir=d:/program files/mysql-5.7.21-winx64
# Set up a storage directory for MySQL database data
Datadir=d:/program Files/mysql-5.7.21-winx64/data
# Maximum number of connections allowed
max_connections=200
# Skip_grant_tables
[MySQL]
Default-character-set=utf8
[Mysql.server]
Default-character-set=utf8
[Mysql_safe]
Default-character-set=utf8
[Client]
Default-character-set=utf8
The second step: set the MySQL environment variable, directly under the path of the MySQL bin directory to put in it.
Step Three: Initialize the installation
Run cmd as an administrator
1. Initial configuration: D:\Program files\mysql-5.7.21-winx64\bin>mysqld--defaults-file=. /my.ini--initialize-insecure
2. Installation Service: D:\Program files\mysql-5.7.21-winx64\bin>mysqld--install
----Online there is an installation command is mysqld-nt install I tried after at least in win 10 under the MySQL 5.7 is invalid
----installation is successful, go to the Control Panel-management tools-service to see if there is a service called MySQL, which indicates the installation was successful.
3. Start Service: D:\Program files\mysql-5.7.21-winx64\bin>net start MySQL
The MySQL service is starting.
The MySQL service has started successfully.
4. Log in to MySQL and set the root password
D:\Program Files\mysql-5.7.21-winx64\bin>mysql-u Root-p
Enter Password: Direct carriage return
Mysql>set Password=password (' 1 ');
----Set the MySQL root password,
Then all configuration is complete!
WIN 10 under MySQL 5.7.21 (free install version) configuration