This topic describes how to create an account that is used to manage the databases of an ApsaraDB RDS for MySQL instance.

Prerequisites

An ApsaraDB RDS for MySQL instance is created. For more information, see Create an ApsaraDB RDS for MySQL instance..
Note You can create RAM users within your Alibaba Cloud account and grant the permissions on specific RDS instances to the RAM users. For more information, see Create a RAM user.

Account types

ApsaraDB RDS for MySQL supports two types of accounts: privileged accounts and standard accounts. You can manage all the accounts and databases of your RDS instance by using the ApsaraDB RDS console. For more information about the permissions that can be granted to each type of account, see Account permissions.
Note After an account is created, you cannot change the type of the account. However, you can delete the account. Then, you can create an account that has the same username as the deleted account. For more information, see Delete a standard account from an ApsaraDB RDS for MySQL instance.
Account typeDescription
Privileged account
  • You can create and manage privileged accounts in the ApsaraDB RDS console or by using the ApsaraDB RDS 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.
  • A privileged account allows you to manage more permissions at fine-grained levels based on your business requirements. For example, you can grant each standard account the permissions to query specific tables from the RDS instance on which the privileged account is created.
  • A privileged account has the permissions on all the databases of the RDS instance on which the privileged account is created.
  • A privileged account has the permissions to disconnect all the standard accounts of the RDS instance on which the privileged account is created.
Standard account
  • You can create and manage standard accounts by using the ApsaraDB RDS console, ApsaraDB RDS API, or SQL statements.
  • More than one standard account is allowed per RDS instance. The maximum number of standard accounts that are allowed varies based on the minor engine version that is used.
  • By default, a standard account can be used only to log on to one or more databases on which the account has permissions. You must manually grant specific permissions to each standard account. For more information, see Modify the permissions of a standard account on an ApsaraDB RDS for MySQL instance.
  • A standard account does not have the permissions to create, manage, or disconnect other accounts of the RDS instance on which the standard account is created.
Account typeMaximum number of databasesMaximum number of tablesMaximum number of accounts
Privileged accountIn ApsaraDB RDS for MySQL, no limits are imposed on the number of databases that can be created on an RDS instance. The underlying file system may have a limit on the number of directories. < 200,000Varies based on the minor engine version.
Standard account< 200,000Varies based on the minor engine version.

Create a privileged account

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Accounts.
  3. Click Create Account.
  4. Configure the following parameters.
    ParameterDescription
    Database Account

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

    • If your RDS instance runs MySQL 5.6, the username must be 2 to 16 characters in length. If your RDS instance runs MySQL 8.0 or MySQL 5.7, the username must be 2 to 32 characters in length.
    • The username must start with a lowercase letter and end with a lowercase letter or digit.
    • The value can contain lowercase letters, digits, and underscores (_).
    • The username cannot be the same as the username of an existing account.
    • The username cannot contain reserved keywords.
    Account TypeSelect Privileged Account.
    Password

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

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and specific special characters.
    • The password can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =
    Note If your RDS instance runs MySQL 5.7, you can configure a custom password policy for your instance. For more information, see Configure a custom password policy for an ApsaraDB RDS for MySQL instance.
    Confirm passwordEnter the password for the account again.
    DescriptionEnter a description that is used to identify the account. The description can be up to 256 characters in length. The description cannot contain http:// or https://.
  5. Click Create.

Reset the permissions of a privileged account

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

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Accounts.
  3. Find the account whose Account Type is Privileged Account. Then, click Reset Permissions in the Actions column.
  4. In the dialog box that appears, enter the password of the privileged account and click OK.

Create a standard account

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Accounts.
  3. Click Create Account.
  4. Configure the following parameters.
    ParameterDescription
    Database Account

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

    • If your RDS instance runs MySQL 5.6, the username must be 2 to 16 characters in length. If your RDS instance runs MySQL 8.0 or MySQL 5.7, the username must be 2 to 32 characters in length.
    • The username must start with a lowercase letter and end with a lowercase letter or digit.
    • The value can contain lowercase letters, digits, and underscores (_).
    • The username cannot be the same as the username of an existing account.
    • The username cannot contain reserved keywords.
    Account TypeSelect Standard Account.
    Authorized DatabasesSpecify the authorized databases of the account. You can specify one or more authorized databases. You can leave this parameter unspecified. In this case, you can grant the permissions on specific databases to the account after the account is created.
    1. In the Unauthorized Databases section, select one or more databases. Then, click the > icon to move the selected databases to the Authorized Databases section.
    2. In the Authorized Databases section, select the Read/Write (DDL + DML), Read-only, DDL Only, or DML Only permissions for each authorized database.

      If you want to grant the same permissions on more than one authorized database at a time, select the authorized databases and click the Set All to button in the upper-right corner of the Authorized Database section. For example, you can click the button to grant the Read/Write (DDL + DML) permissions on the selected authorized databases.

      Note For more information, see Account permissions.
    Password

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

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and specific special characters.
    • The password can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =
    Note If your RDS instance runs MySQL 5.7, you can configure a custom password policy for your instance. For more information, see Configure a custom password policy for an ApsaraDB RDS for MySQL instance.
    Confirm PasswordEnter the password for the account again.
    DescriptionEnter a description that is used to identify the account. The description can be up to 256 characters in length. The description cannot contain http:// or https://.
  5. Click Create.

FAQ

Related operations

OperationDescription
CreateAccountCreates an account that is used to manage the databases of an RDS instance.