Official website: Https://dev.mysql.com/downloads/mysql/,MySQL Community (Community Edition) Server 5.7.21, after the download is complete, unzip the file.
(1) in the MySQL directory, add the My.ini file, the content is as follows:
[client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=e:\mysql-5.7.21# Unzip directory datadir=e:\mysql-5.7.21\data# extract directory under Data directory Sql_mode=no_engine_substitution,strict_trans_tables
(2) Use the administrator to run the cmd command, switch directories to E:\mysql-5.7.21\bin (according to the specific installation directory), execute the command, install MySQL:
Mysqld--initialize-insecure--user=root;
(3) Start MySQL, configure the root account, default is no password.
Mysql-u root-p; UPDATE user SET authentication_string =password (' 123456 ') WHERE user= ' root '; flush privileges;
(4) Common mistakes, forgot password:
In My.ini Add startup parameters, skip password verification, as follows:
[client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=e:\mysql-5.7.21# Unzip directory datadir=e:\mysql-5.7.21\data# extract directory under Data directory Sql_mode=no_engine_substitution,strict_trans_tables Skip-grant-tables[Winmysqladmin]
To restart MySQL:
net stop mysql;net start MySQL;
Continue the above process to modify the password, after the modification, comments out, restart MySQL can use the account password login.
Deploy MySQL database under window