【时间】2019.11.30
【题目】MySQL忘记root密码怎么重置
1、参考 MySQL忘记root密码怎么重置
其中第5步对于mysql 5.7.X及以上版本,应该使用:
update mysql.user set authentication_string=password("123456") where user="root";
而不是:
update user set password=password("123456") where user="root";
或者参考:
2、当你忘记输密码如输入mysql -uroot 或者密码错误时会出现下面的错误:
mysql ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)
这时参考1修改root密码就行了。