PolarDB-X provides two types of accounts: privileged accounts and standard accounts. This topic describes how to use these accounts to manage PolarDB-X instances.

Account types

The following table describes the two types of accounts that are provided by PolarDB-X.
Account type Maximum number of databases that can be created Description
Privileged account 500
  • You can create and manage privileged accounts by using the PolarDB-X console or API operations.
  • You can create only one privileged account for each instance. This privileged account can be used to manage all standard accounts and databases in the instance.
  • The privileged account is granted more permissions than a standard account to perform personalized and fine-grained management on permissions. For example, you can use the privileged account to grant different users different permissions to access different tables.
  • The privileged account is granted full permissions on all databases in the instance and can be used to disconnect other accounts.
Standard account 500
  • You can create or manage standard accounts in the console, by calling API operations, or executing SQL statements.
  • You can create one or more standard accounts on each instance. The maximum number of standard accounts that can be created on an instance is determined by the kernel engine of the instance.
  • You must grant standard accounts the required permissions on specific databases.
  • You cannot use a standard account to create or manage other accounts, or disconnect other accounts from databases.
Note
  • After an account is created, the type of the account cannot be changed. You can delete the account and then create an account whose name is the same and the account type is different.
  • You can create RAM users in your Alibaba Cloud account and grant the permissions on specific instances to the RAM users. For more information, see Create a RAM user.
You can perform the following operations to manage an account in the console:

Create an account

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the PolarDB-X 2.0 tab.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose ConfigurationManagement > Account Management.
  6. Click Create account. On the page that appears, configure the parameters.
    Parameter Description
    Account name The name of the account.
    Note The name of an account must meet the following requirements:
    • The name can be up to 16 characters in length and can contain lowercase letters, digits, and underscores (_).
    • The name must start with a lowercase letter and end with a lowercase letter or digit.
    • The name must be unique.
    Account type The type of the account. Two types of accounts are supported: privileged accounts and standard accounts.
    Note You can create only one privileged account for each PolarDB-X instance.
    Authorization database You can grant permissions on one or more databases to the account.
    1. Select one or more databases and click 456789 to move the selected databases from the Databases area on the left side to the Authorized database area on the right side.
    2. In the Authorized database area on the right side, select the permissions on the databases.
    Note
    • This parameter is available only when you create a standard account.
    • This parameter is optional. You can grant permissions to the account after the account is created.
    • Supported permissions are Read and write, Read only, DML only, DDL only, and Read only and index.
    • If you need to grant the same permissions on all selected databases, you can click the corresponding button next to Permissions in the upper-right corner of the Authorized database area, such as Set All to Read and write.
    Password The password of the account.
    Note The password of the account must meet the following requirements:
    • The password must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • The password can contain the following special characters:

      @#$%^&+=

    Confirm password The password of the account. Enter the password again to confirm the password.
    Descr The information that can help you manage the account. The account description must be 0 to 256 characters in length.

Reset password

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, choose ConfigurationManagement > Account Management.
  5. On the page that appears, find the account for which you want to reset the password and click Change password in the Operation column.
  6. In the dialog box that appears, enter and confirm the new password, and then click OK.
    Note The password of the account must meet the following requirements:
    • The password must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • The password can contain the following special characters:

      @#$%^&+=

Modify the permissions that are granted to a standard account

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, choose ConfigurationManagement > Account Management.
  5. On the page that appears, find the account for which you want to modify permissions and click Modify permissions in the Operation column.
    Note The privileged account is granted full permissions on all databases. You do not need to modify permissions for a privileged account.
  6. On the page that appears, select one or more databases and click 456789 to move the selected databases from the Databases area on the left side to the Authorized database area on the right side.
  7. In the Authorized database area on the right side, select the permissions on the databases.
    Note
    • Supported permissions are Read and write, Read only, DML only, DDL only, and Read only and index.
    • If you want to grant the same permissions on all selected databases, you can click the corresponding button next to Permissions in the upper-right corner of the Authorized database area, such as Set All to Only DDL.
  8. Click OK.

Delete an account

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. Find the target instance and click its ID.
  4. In the left-side navigation pane, choose ConfigurationManagement > Account Management.
  5. On the page that appears, find the account that you want to delete and click Delete in the Operation column.
  6. In the dialog box that appears, click OK.