1. Enter the bin directory
2. Uninstall the command mysqld --remove
3. Check if your my.ini is configured correctly
#basedir represents your own MySQL installation root directory
basedir = D:\\MySoftWare\\mysql-5.7.9-winx64
#datadir represents the directory where your MySQL database is saved. If you do not create a new data folder in the root directory of the MySQL installation
datadir = D:\\MySoftWare\\mysql-5.7.9-winx64\\data
#port represents the port number
port = 3306
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4. mysqld --initialize
5. mysqld -install
6. net start mysql
7. mysql -u root -p (login without permission)
8. [mysqld] skip-grant-tables below one line
9. mysql -u root -p
10. use mysql
11. update mysql.user set authentication_string=password('root') where user='root';
12. update mysql.user set authentication_string=password('root') where user='root';
11. Change password
alter user 'root'@'localhost' identified by 'roottest1';
flush privileges;