All Products
Search
Document Center

ApsaraDB RDS:Create a database and an account

Last Updated:Jul 08, 2025

This topic describes how to create a database and an account on an ApsaraDB RDS for MariaDB instance.

Account types

ApsaraDB RDS for MariaDB supports two types of accounts: privileged accounts and standard accounts. You can manage all accounts and databases of your RDS instance in the ApsaraDB RDS console.

Account type

Description

Privileged Account

  • You can create and manage it only through the console or an API.

  • Only one privileged account is allowed per RDS instance. A privileged account has the permissions to manage all the databases and standard accounts of the RDS instance on which the privileged account is created.

  • Additional permissions are available to meet personalized and fine-grained permission management requirements, such as assigning query permissions for different tables on a per-user basis.

  • A privileged account has the permissions on all databases of the RDS instance on which the privileged account is created.

  • You can disconnect any account.

Standard Account

  • You can create and manage standard accounts by using the ApsaraDB RDS console, API operations, or SQL statements.

  • More than one standard account can be created for each RDS instance. The maximum number of standard accounts that are allowed for an RDS instance varies based on the minor engine version of the RDS instance.

  • You must grant the permissions on specific databases to standard accounts.

  • You cannot use a standard account to create, manage, or log off other accounts from the RDS instance on which the standard account is created.

Create a privileged account

  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 instance ID.

  2. In the left-side navigation pane, click Accounts.

  3. Click Create Account.

  4. Configure the following parameters.

    Parameter

    Description

    Database Account

    Enter a username for the account. The value must meet the following requirements:

    • The username must start with a letter and end with a letter or a digit.

    • It can contain lowercase letters, digits, or underscores (_).

    • It must be 2 to 16 characters in length.

    Note

    If the username of the privileged account is the same as that of an existing standard account, the privileged account replaces the standard account.

    Account Type

    Select Privileged Account.

    New Password

    Enter a password for the account. The value must meet the following requirements:

    • The password must be 8 to 32 characters in length.

    • It must contain 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

    Enter the password for the account again.

    Description

    Enter a description that helps identify the account. The value can be up to 256 characters in length.

  5. Click OK.

Reset the permissions of a privileged account

If the privileged account of your RDS instance encounters exceptions such as accidentally revoked permissions, you can perform the following steps to reset the permissions:

  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 instance ID.

  2. In the left-side navigation pane, click Accounts.

  3. Click Reset Account Permissions to the right of Privileged Account.

  4. Enter the privileged account password to reset the account permissions.

Create a standard account

  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 instance ID.

  2. In the left-side navigation pane, click Accounts.

  3. Click Create Account.

  4. Configure the following parameters.

    Parameter

    Description

    Database Account

    Enter a username for the account. The value must meet the following requirements:

    • The username must start with a letter and end with a letter or a digit.

    • It can contain lowercase letters, digits, or underscores (_).

    • It must be 2 to 16 characters in length.

    Account Type

    Select Standard Account.

    Authorize Database:

    Specify the authorized databases of the account. You can specify one or more authorized databases. You can leave this parameter empty and grant the account the permissions on specific databases when you create the databases. For more information, see Create a database on an ApsaraDB RDS for MariaDB instance.

    1. Select one or more databases from the left side and click image to add them to the right side.

    2. In the right section, select Read/Write (DDL + DML), Read-Only, DDL Only, or DML Only for a specific database.

      If you want to grant the same permissions on more than one database at a time, click the button in the upper-right corner of the right section, such as Set All To Read/Write (DDL+DML).

      Note

      The parameter settings in the upper-right corner change after you click them. For example, after you click Set All To Read/Write (DDL+DML), the button changes to Set All To Read-only.

    New Password

    Enter a password for the account. The value must meet the following requirements:

    • The password must be 8 to 32 characters in length.

    • It must contain 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

    Enter the password for the account again.

    Description

    Enter a description that helps identify the account. This parameter is optional. Enter a description that helps identify the account. The value can be up to 256 characters in length.

  5. Click OK.

Create a database

  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 instance ID.

  2. In the left-side navigation pane, click Databases.

  3. Click Create Database.

  4. Configure the following parameters.

    Parameter

    Description

    Database Name

    • The username must start with a letter and end with a letter or a digit.

    • It can contain lowercase letters, digits, underscores (_), and hyphens (-).

    • The name of the database. It must be 2 to 64 characters in length.

    Supported Character Set

    The character set of the database.

    Authorized By

    The account to which you want to grant the permissions on the database. You can leave this parameter empty. You can grant the permissions on a database to an account after the database is created. For more information, see Modify or reset account permissions.

    Note

    Only Standard Account are displayed here, because the privileged account has all permissions on all databases and does not require authorization.

    Description

    Enter a description that helps identify the account. This parameter is optional. The description can be up to 256 characters in length.

  5. Click Create.

Related operations

API

Description

CreateAccount

Creates an account on an instance.

CreateDatabase

Creates a database on an instance.