Updated on 2026-04-24 GMT+08:00

Resetting the Administrator Password

Scenarios

If you forget the password of the administrator account root, you can reset the password. The new password is applied immediately without rebooting the instance.

Precautions

  • If the password you provide is considered weak by the system, you will be prompted to provide a stronger password.
  • If you have changed the administrator password of the primary DB instance, the administrator passwords of the standby DB instance and read replicas (if any) will also be changed.
  • The time required for the new password to take effect depends on the amount of service data currently being processed by the primary DB instance.
  • To protect against brute force hacking attempts and ensure system security, change your password periodically.
  • If you have logged in to your instance as the root user, resetting the password may interrupt services. Exercise caution when performing this operation.

Method 1

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service.
  4. On the Instances page, locate the target DB instance and choose More > Reset Password in the Operation column.
  5. In the displayed dialog box, enter and confirm the new password.

    Keep this password secure. The system cannot retrieve it.

    • The password must contain 8 to 32 characters and at least four types of the following: uppercase letters, lowercase letters, digits, and special characters (~!). @ # $ % ^ * - _ = + ? , ( ) & . |
    • Enter a strong password and periodically change it for security reasons.

Method 2

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service.
  4. On the Instances page, click the target instance name.
  5. On the Basic Information page, find Administrator and click Reset Password under it.
  6. Enter and confirm the new password.

    Keep this password secure. The system cannot retrieve it.

    • The password must contain 8 to 32 characters and at least four types of the following: uppercase letters, lowercase letters, digits, and special characters (~!). @ # $ % ^ * - _ = + ? , ( ) & . |
    • Enter a strong password and periodically change it for security reasons.