
# RDS for MySQL数据库修改authentication_string字段为显示密码后无法登录
#### 场景描述
客户通过navicat修改RDS for MySQL的user表root账号的"authentication_string"字段，修改为显示密码后无法登录客户端。
问题可能出现的版本：MySQL-8.0.20.6
#### 原因分析
修改密码方式错误，不应直接改user表的authentication_string字段的hash key，而是要通过console重置root密码方式修改。
#### 解决方案
由于8.0版本不支持password函数，因此需要通过以下步骤恢复：
1. 找出rdsAdmin账号的authentication_string字段，使用以下命令更新： 
   ```
   update mysql.user set authentication_string='XXX'
   ```
   其中*XXX*为新修改的密码。
   ![](https://support.huaweicloud.com/trouble-rds-mysql/zh-cn_image_0000002247144245.png "点击放大")
   
   
2. 重置root账号密码。 
   ```
   ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'XXX';
   flush privileges;
   ```
   ![](https://support.huaweicloud.com/trouble-rds-mysql/zh-cn_image_0000002247224325.png "点击放大")
   修改后用户就可以正常登录root账号。
   
   
 
