net stop mysql
mysqld --console --skip-grant-tables --shared-memory
mysql.exe -u root
UPDATE mysql.user SET authentication_string='root' WHERE user='root' and host='localhost';
mysql8.0版本忘记root密码
原文:https://www.cnblogs.com/twodoge/p/10034405.html