You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
Quick start
Creating database and account
Copy page
Download PDF
Creating database and account
This topic describes how to create database and account for PostgreSQL instance.​
Prerequisites​
You have Creating an instance, and the instance is in the Running status.​
Creating a database​
  1. In the upper-left corner of the top menu bar, select the project and region for the instance.​
tip​
If the project of the instance has not been set, the project should be selected as All resources.​
  1. Click on Instances in the left navigation bar.​
  1. On the Instances page, click on the target instance name to enter the instance details page.​
  1. At the top of the page, click Databases.​
  1. On the Databases tab, click Create database, and in the dialog box that pops up, set the following parameters.​
​
Parameter​
Description​
Database name​
Fill in the database name. The naming rules are as follows:​
  • The name is unique within the instance.​
  • 2 to 63 characters in length.​
  • Must start with a letter and end with a letter or a digit.​
  • Can contain letters, digits, underscores (_) and hyphens (-).​
  • Some reserved words or keywords cannot be used in the database name, see Reserved keywords for all reserved keywords.​
Character set​
Select UTF8, Latin1, or ASCII.​
Collate​
String collation.​
Ctype​
Character set​
Database owner​
Select an account to be the owner of the database. This parameter is optional. You can also modify the database authorized by the account after the creation is complete.​
tip​
Instance read-only accounts, high-privilege accounts with DDL privileges disabled, or normal accounts with DDL privileges disabled cannot be used as database owners.​
​
  1. Click OK to complete database creation.​
​
Creating an account​
  1. In the upper-left corner of the top menu bar, select the project and region for the instance.​
tip​
If the project of the instance has not been set, the project should be selected as All resources.​
  1. Click on Instances in the left navigation bar.​
  1. On the Instances page, click on the target instance name to enter the instance details page.​
  1. Click the Accounts tab on top of the page.​
  1. On the Accounts tab, click Create account, and set the following parameters in the pop-up dialog box.​
​
Parameter​
Description​
Database account​
Enter the account name. Naming rules are as follows:​
  • The name is unique within the instance.​
  • The account name length is 2 to 63 characters.​
  • Must start with a letter and end with a letter or a digit.​
  • Can contain letters, digits, underscores (_) and hyphens (-).​
  • Some reserved characters or keywords are forbidden in database account names. For more information about a list of forbidden keywords, refer to List of reserved keywords.​
  • Do not start the name with pg_.​
Account type​
Select Super account, Normal account, or Instance read-only account as the account type.​
  • Super account: You can create multiple super accounts in an instance to manage all normal accounts and databases.​
  • Normal account: Multiple accounts can be created in one instance, and only operations permitted by permissions can be performed in authorized databases.​
  • Instance read-only account: Multiple accounts can be created in one instance, only has read-only permissions on all databases under the instance.​
Password​
Set the account password. Requirements are as follows:​
  • The password length is limited to 8~32 characters.​
  • The password consists of any three types of characters as follows: uppercase letters, lowercase letters, digits, and special characters.​
  • Special characters include !@#$%^*&()_+-=.​
Confirm password​
Enter the password again.​
Account privileges​
You can set the following permissions for your account:​
  • Login: Login.​
  • Inherit: Inheritance.​
  • CreateRole: Create a role.​
  • CreateDB: Creates the database.​
tip​
  • The super account has all four permissions and does not need to be set separately.​
  • Permissions can be set for normal accounts as required.​
  • If you are creating an instance read-only account, no account permission settings are required.​
​
  1. Click OK.​
​
​
​
​
Last updated: 2025.11.17 16:15:11