Updated on 2024-10-14 GMT+08:00

Creating a Database Account

Scenarios

When you create an RDS for SQL Server instance, account rdsuser is created at the same time by default. You can create other database accounts as needed.

You can create a database account using RDS or DAS:
  • RDS: RDS is easy to use. There are no commands to remember.
  • DAS: DAS is a powerful platform that offers more flexibility, but you need to be familiar with various commands. The process requires a bit more expertise.

Constraints

Database accounts cannot be created for DB 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.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name.
  5. On the Accounts page, click Create Account.
  6. In the displayed dialog box, specify Username, Password, and Confirm Password, and click OK.

    Figure 1 Creating an account
    • The username can contain 1 to 128 characters. It can include letters, digits, hyphens (-), and underscores (_), and it must be different from system accounts. System accounts include rdsadmin, rdsuser, rdsbackup, and rdsmirror.
    • The password must consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_+?,).
    • The password must differ from the account name or the account name in reverse order.
    • Enter a strong password to improve security, preventing security risks such as brute force cracking.
    • If you require fine-grained permissions control, log in to the database through the DAS console.

  7. After the account is created, you can manage it on the Accounts page.

Creating a Database Account Through DAS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, locate the target DB instance and click Log In in the Operation column.
  5. On the displayed page, enter the username and password and click Log In.
  6. On the top menu bar, choose SQL Operations > SQL Query.
  7. Run the following command to create an account.

    create user username;