Windows示例
net stop mysql
mysqld --skip-grant-tables
之后该窗口将无法再继续操作
mysql
UPDATE user SET authentication_string = password(‘112233‘) where user = ‘root‘;
FLUSH PRIVILEGES;
exit
net start mysql
mysql -u root -p
原文:https://www.cnblogs.com/convict/p/14750178.html