This topic describes how to manage a database account, such as how to change the password, lock or unlock an account, and delete an account.

Background information

You can create privileged and standard database accounts in PolarDB. You can manage all accounts in the console.

Create a database account

For more information, see Create a database account.

Change the password

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Accounts.
  5. Find the account for which you want to change the password and click Change Password in the Actions column.Change the password
  6. In the dialog box that appears, enter New Password and Confirm New Password and click OK.

Lock an account

You can lock an account. This way, the account is not allowed to log on to the database.

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Accounts.
  5. Find the account that you want to manage and turn on the switch in the Lock Status column.

Unlock an account.

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Accounts.
  5. Find the account that you want to manage and turn off the switch in the Lock Status column.

Delete an account

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Accounts.
  5. Find the account that you want to delete and click Delete in the Actions column.
  6. In the message that appears, click OK.

Related API operations

API Description
CreateAccount Creates an account.
DescribeAccounts Queries the accounts of a specified cluster.
ModifyAccountDescription Modifies the description of a database account for a PolarDB cluster.
ModifyAccountPassword Changes the password of a database account.
DeleteAccount Deletes an account.