If you forget your account password, need to change it, or did not set a password when you created an instance, you can reset it in ApsaraDB for MongoDB.
Considerations
Before you reset a password, check whether any applications are connected to the database instance to prevent service interruptions.
Resetting a password does not affect the running state of the instance.
Limitations
Instance type | Supported accounts |
standalone instance | root |
replica set instance | root |
sharded cluster instance |
|
Procedure
Log on to the ApsaraDB for MongoDB console.
In the navigation pane on the left, click Replica Set Instances or Sharded Cluster Instances, based on the instance type.
In the upper-left corner of the page, select the resource group and region of the instance.
Find the target instance and click its ID, or click Manage in the Actions column.
Based on the instance type and account type, perform one of the following operations.
Reset the password for the root account (for a standalone instance, replica set instance, or sharded cluster instance)
In the navigation pane on the left of the instance details page, click Accounts.
Find the root account and click Reset Password in the Actions column.
Reset the password for a ConfigServer or shard node account (for a sharded cluster instance)
NoteIf you have not yet applied for an endpoint for a ConfigServer or shard node, you must apply for one first. For instructions, see Apply for a shard or ConfigServer endpoint.
In the navigation pane on the left of the instance details page, click Accounts.
Find the target account and click Reset Password in the Actions column.
In the Reset Password panel, set the following parameters.
Parameter
Description
Account
The target account. This parameter cannot be changed.
New Password
Set a new password for the account. The password must meet the following requirements:
It must contain characters from at least three of the following categories: uppercase letters, lowercase letters, digits, and special characters. The supported special characters are:
!@#$%^&*()_+=
The password must be 8 to 32 characters long.
Confirm New Password
Re-enter the new password to confirm it.
Click OK.