1. 由于mysqld –skip-grant-tables实测在mysql8.0中已失效,现使用mysqld --console --skip-grant-tables --shared-memory
2. 修改密码 update user set authentication_string='123456' where user='root' 其中123456为修改的密码。
其他版本修改密码:update user set password=password('123456') where user='root';
本文介绍了在MySQL 8.0环境下使用mysqld--console--skip-grant-tables--shared-memory来临时禁用授权表,以便于修改root用户的密码,并提供了适用于不同版本的密码修改方法。

被折叠的 条评论
为什么被折叠?



