All Products
Search
Document Center

ApsaraDB RDS:Create a privileged account or a standard account

Last Updated:Feb 02, 2024

This topic describes how to create a privileged account or a standard account on an ApsaraDB RDS for SQL Server instance.

Prerequisites

An RDS instance is created. For more information, see Create an ApsaraDB RDS for SQL Server instance.

Usage notes

  • The first account that you create for your RDS instance must be a privileged account. You can create only one privileged account for each RDS instance. The privileged account cannot be deleted in the ApsaraDB RDS console or by calling an API operation.

  • We recommend that you do not use Terraform to create a privileged account. A privileged account cannot be deleted by using Terraform. If you create a privileged account by using Terraform, you cannot delete the account by using Terraform. As a result, you may fail to release or unsubscribe from the RDS instance.

  • Databases that are created on an RDS instance share all the resources that belong to the instance.

  • The account name and database name cannot contain forbidden keywords. For more information, see Forbidden keywords.

  • For security purposes, we recommend that you specify strong passwords for accounts and change the passwords on a regular basis.

  • We recommend that you follow the principle of least privilege (PoLP) and grant the read and write permissions to accounts based on your business requirements. You can create multiple accounts and grant each account only the permissions to access the data of specified databases. If an account does not need to write data to a database, we recommend that you grant only the read permissions on the database to the account.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane of the page that appears, click Accounts.

  3. On the page that appears, click Create Account and configure the following parameters.

    Parameter

    Description

    Database Account

    The name of the account. The name can be up to 50 characters in length and can contain lowercase letters, digits, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or a digit.

    Account Type

    Privileged Account: If this is the first time you create an account on the RDS instance, you must create a privileged account. You can create only one privileged account for each RDS instance. You cannot delete a privileged account.

    Standard Account: You can create multiple standard accounts for an RDS instance. You must manually grant the permissions on databases to each standard account.

    Note

    Authorize Database:

    You can grant different permissions on one or more databases to a Standard Account. If no databases are created, you can leave this parameter empty. After you create databases, you can grant permissions on your databases to a standard account. To grant permissions on a database to an account, perform the following steps:

    1. In the Unauthorized Databases section, select the databases on which you want to grant permissions to the account.

    2. Click the image.png icon to add the selected databases to the Authorized Databases: section.

    3. Grant the Read/Write (DML), Read-only, or Owner permissions on the databases to the account.

      Note

      The account is authorized to create tables, delete tables, and modify schemas in a database only when it has the Owner permissions on the database.

    New Password

    The password of the account. The password must meet the following requirements:

    • It is 8 to 32 characters in length.

    • It contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters.

    • It can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =

    Confirm Password

    The password of the account.

    Description

    The description of the account. The description can be up to 256 characters in length.

  4. Click OK.

    You can refresh the page to view the created account. You can also modify the account permissions or manage the account based on your business requirements. For more information, see Modify the permissions of an account, Reset the password of an account on an ApsaraDB RDS for SQL Server instance, or Delete a standard account from an ApsaraDB RDS for SQL Server instance.

References

  • For more information about how to call an API operation to create a privileged account, a standard account, or other accounts with the required permissions, see CreateAccount.

  • For more information about how to create a system admin account in the ApsaraDB RDS console, see Create a system admin account.

FAQ

Can I manage the accounts that are created on the primary RDS instance on read-only RDS instances?

No, you cannot manage the accounts on the read-only RDS instances. The accounts that are created on your primary RDS instance are synchronized to the read-only RDS instances and have only read permissions on the read-only RDS instances.