This topic describes how to create accounts and databases for an RDS for MariaDB instance.

Account types

RDS for MariaDB instances support two types of database accounts: premier accounts and standard accounts. You can manage all your accounts and databases through the RDS console.
Account type Description
Premier account
  • Can only be created and managed through the RDS console or API.
  • Each RDS for MariaDB instance can have only one premier account, which can be used to manage all databases and standard accounts.
  • Has more permissions for fine-grained, personalized management. For example, you can grant the permission of querying different tables to different users.
  • Has permissions for all databases in the corresponding RDS for MariaDB instance.
  • Can disconnect the connections established by any other accounts.
Standard account
  • Can be created and managed through the RDS console, API, or SQL statements.
  • You can create multiple standard accounts for an RDS for MariaDB instance, depending on the number of instance cores.
  • Must be manually authorized with database permissions.
  • Cannot create or manage other accounts, or terminate the connections established by other accounts.

Create a premier account

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.创建账号
  6. Set the following parameters.
    Parameter Description
    Database Account

    The account name must be 2 to 16 characters in length and can contain lowercase letters, numbers, and underscores (_). It must start with a letter and end with a letter or number.

    Note If the name of the premierr account to be created is the same as that of an existing standard account, the standard account is replaced with the premier account.
    Account Type Select Premier Account.
    Password

    The account password must be 8 to 32 characters in length and contain at least three of the following types of characters: uppercase letters, lowercase letters, numbers, and special characters. The allowed special characters are as follows:

    ! @ # $ % ^ & * ( ) _ + - =

    Re-enter Password Enter the password again.
    Note Optional. Enter details about the premier account to better identify it. You can enter up to 256 characters.
  7. Click OK.

Reset the permissions of a premier account

If the premier account is abnormal (for example, the account permissions are unexpectedly revoked), you can reset the permissions. To do so, follow these steps:

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Accounts.
  5. Find the supperuser account, and click Reset Permissions in the Actions column.重置权限
  6. Enter the password of the premier account and click OK.

Create a standard account

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Accounts.
  5. Click Create Account.创建账号
  6. Set the following parameters.
    Parameter Description
    Database Account The account name must be 2 to 16 characters in length and can contain lowercase letters, numbers, and underscores (_). It must start with a letter and end with a letter or number.
    Account Type Select Standard Account.
    Authorized Databases Grant the permissions for one or more databases to the account. This parameter is optional. You can also grant permissions to the account after the account is created. For more information, see Create a database.
    1. Select one or more databases from the left area and click Add to add the selected databases to the right area.
    2. In the right area, click Read/Write, Read-only, DDL Only, or DML Only.

      If you want to grant the permissions for multiple databases in batches, select all the databases and in the upper-right corner click the button such as Full Control Read/Write.

      Note The button in the upper-right corner changes as you click. For example, after you click Full Control Read/Write, the permission changes to Full Control Read-only.
    Password

    The account password must be 8 to 32 characters in length and contain at least three of the following types of characters: uppercase letters, lowercase letters, numbers, and special characters. The allowed special characters are as follows:

    ! @ # $ % ^ & * ( ) _ + - =

    Re-enter Password Enter the password again.
    Note Optional. Enter details about the standard account to better identify it. You can enter up to 256 characters.
  7. Click OK.

Create a database

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Databases.
  5. Click Create Database.创建数据库
  6. Set the following parameters.
    Parameter Description
    Database Name The database name must be 2 to 64 characters in length and can contain lowercase letters, numbers, underscores (_), and hyphens (-). It must start with a letter and end with a letter or number.
    Supported Character Set Select utf8, gbk, latin1, or utf8mb4.
    Authorized Account Select the account that needs to access this database. You can also set the authorized account after the database is created. For more information, see Change the permissions of an account.
    Note Only standard accounts are displayed because the premier account has all permissions for all databases.
    Account Type Select Read/Write, Read-only, DDL only, or DML only.
    Remarks Optional. Enter details about the database to better identify it. You can enter up to 256 characters.
  7. Click OK.

APIs

API Description
CreateAccount Used to create an account for an RDS instance.
CreateDatabase Used to create a database for an RDS instance.