云数据库 RDS-RDS for MySQL数据库修改authentication_string字段为显示密码后无法登录:解决方案

时间:2023-12-27 16:31:16

解决方案

由于8.0版本不支持password函数,因此需要通过以下步骤恢复:

  1. 找出rdsAdmin账号的authentication_string字段,使用以下命令更新:

    update mysql.user set authentication_string='XXX'

    其中XXX为新修改的密码。

  2. 重置root账号密码。

    ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'XXX';
    flush privileges;

    修改后用户就可以正常登录root账号。

support.huaweicloud.com/trouble-rds/rds_12_0026.html