According to the information on the Internet, MYSQ does not have a Dada directory at the beginning of version 5.7, and requires an additional "initialize database" operation to automatically generate the data directory.
1.:
Https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.17-winx64.zip,
After the download is done, unzip to the directory you want to put in, I placed it directly under the D-Packing directory. The \ Bin directory within the file is then added to the environment variable path:
2. Create a new My.ini file in the MySQL directory or modify the My-default.ini content directly: Copy and save the following:
[Client]
port=3306
Default-character-set=utf8
[Mysqld]
port=3306
Character_set_server=utf8
#解压目录
Basedir=d:\mysql-5.7.17-winx64
#解压目录下data目录
Datadir=d:\mysql-5.7.17-winx64\data
Sql_mode=no_engine_substitution,strict_trans_tables
[Winmysqladmin]
%mysql%\bin\mysqld.exe
3. Open cmd as Administrator and enter the \mysql-5.7.17-winx64\bin directory.
3.1. First install the MySQL service:
Command: Mysqld--install
3.2. Initialize the database and produce the \data directory:
Command: mysqld--initialize--console
This step produces a default initial password, as shown in the red box. The next step is to change the password.
3.3 Starting the MySQL server
Command: net start MySQL
3.4 Log in to MySQL database, change password
Command: Mysql-uroot-p
Enter the password obtained in 3.2
Modify password operation: SET PASSWORD = PASSWORD (' 123456 ');
Log out of MySQL and re-login with the new password:
Complete.
Installation tutorials for MySQL mysql-5.7.17-winx64 (community service Edition, Community Server) in Windows environment