Updated on 2026-04-24 GMT+08:00

Creating a Database Account

Scenarios

When you create a DB instance, account root is created at the same time by default. You can create other database accounts as needed.

Account Type

Table 1 Account description

Account Type

Description

Administrator account root

Only the administrator account root is provided on the instance creation page. For details about the supported permissions, see RDS for MySQL Constraints.

Running revoke, drop user, or rename user on root may cause service interruption. Exercise caution when running any of these statements.

System accounts

To provide O&M services, the system automatically creates system accounts when you create RDS for MySQL DB instances. These system accounts are unavailable to you.

  • rdsAdmin: a management account with the highest privileges. It is used to query and modify instance information, rectify faults, migrate data, and restore data.
  • rdsRepl: a replication account. It is used to synchronize data from a primary instance to its standby instance or read replicas.
  • rdsBackup: a backup account. It is used to back up data in the background.
  • rdsMetric: a metric monitoring account. It is used by watchdog to collect database status data.
  • rdsProxy: a proxy account. It is automatically created when Database Proxy is enabled and is used for authentication when a database is connected through a read/write splitting address.
  • rdsFillBinlog: a binlog synchronization account. If binlogs are not synchronized during a primary/standby switchover, this account is created to synchronize binlogs.

Other accounts

Accounts created through the console, APIs, or SQL statements

After an account is created, you can assign permissions to it as required. For details, see Changing Permissions for a Database Account.

Constraints

  • This operation is not allowed for instances that are being restored.

Creating a Database Account Through RDS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service.
  4. On the Instances page, click the target DB instance to go to the Basic Information page.
  5. In the navigation pane on the left, choose Databases and Accounts and click the Accounts tab.
  6. On the displayed page, click Create Account. In the displayed dialog box, specify Username and Host IP Address, authorize permissions for databases, enter a password, and confirm the password. Then, click OK.

    • If the DB engine version is RDS for MySQL 5.6, the username can contain 1 to 16 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
    • If the DB engine version is RDS for MySQL 5.7 or 8.0, the username can contain 1 to 32 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
    • You can specify IP addresses that are allowed to access your DB instance.
      • To enable all IP addresses to access your instance, enter % for Host IP Address.
      • To enable all IP addresses in the subnet 10.10.10.x to access your instance, enter 10.10.10.% for Host IP Address.
      • To specify multiple IP addresses, separate them with commas (,), for example, 192.168.0.1,172.16.213.9 (no spaces before or after the comma).
    • Select unauthorized databases and click to authorize them or select authorized databases and click to revoke permissions.

      If there are no unauthorized databases, you can create one by referring to Creating a Database. You can also modify the permissions after the account creation by referring to Changing Permissions for a Database Account.

    • The password must contain 8 to 32 characters and at least four types of the following: uppercase letters, lowercase letters, digits, and special characters (~!). @ # $ % ^ * - _ = + ? , ( ) & . |
    • The password must be different from the username or username spelled backwards.
    • Enter a strong password to improve security, preventing security risks such as brute force cracking.

  7. After the database account is created, you can add remarks (for 8.0.25 and later versions), reset the password, modify permissions, change the host IP addresses for the account, and delete the account.