Uninstall
Administrator, open cmd, enter the mysql installation directory / bin (if not, then configure the environment variables), enter the command mysqld --remove mysql
Then emptied my.ini described in the data folder.
If there are skip-grant-tables my.ini in its note off.
re-install
Input command mysqld --initialize --user = mysql --console
Enter the command mysqld --install
start up
Start MySQL service
change Password
Enter the command MySQL -u root -p , then enter
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER;
-- 密码永不过期
Test Connection
reference
https://www.cnblogs.com/tanshaoxiaoji/p/mysql_open_services.html
https://blog.csdn.net/qq_37350706/article/details/81707862