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.
Constraints
Database accounts cannot be created for DB instances that are being restored.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project.
- Click Service List. Under Database, click Relational Database Service.
- On the Instances page, click the instance name.
- On the Accounts page, click Create Account.
- In the displayed dialog box, enter the username and password, specify Permission, and click OK.
Table 1 Parameter description Parameter
Description
Username
The username can contain 1 to 63 characters. It can include letters, digits, and underscores (_). It cannot start with pg or a digit and must be different from the system usernames. System usernames include rdsadmin, rdsuser, rdsbackup, and rdsmirror.
Password
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 cannot contain the username or the username spelled backwards.
Enter a strong password to improve security, preventing security risks such as brute force cracking.
Permission
You can assign permissions, including CREATEDB, CREATEROLE, and REPLICATION, to the user.
- CREATEDB: indicates that the user has the permission to create a database. If this attribute is not specified, the user cannot create databases by default.
- CREATEROLE: indicates that the user has the permission to create other users. If this attribute is not specified, the user cannot be used to create new users by default.
- REPLICATION: indicates that the user can use streaming replication or logical replication. If this attribute is not specified, the user cannot be used to set up streaming replication or logical replication by default.
- After the account is created, manage it on the Accounts page.
- Scenarios
- Constraints
- Procedure