1:进入cmd2:命令:MySQL -u root mysql 回车3:命令:update user set password=password('新密码') where user='root';最后分号不要丢4:命令:flush privileges;5: 重启mysql