Before you can use an ApsaraDB RDS instance, you must create a database on the instance. This topic describes how to create a database on an ApsaraDB RDS for PostgreSQL instance.
Terms
- instance: a virtualized database server. You can create and manage multiple databases on an RDS instance.
- database: a set of data that is stored in an organized manner and can be shared by a number of users. A database provides the minimal redundancy and is independent of applications. In simple words, a database is a data warehouse that is used to store data.
- character set: a collection of letters, special characters, and encoding rules that are used in a database.
Usage notes
You can create and manage databases in the ApsaraDB RDS console.
Before you can migrate data from an on-premises database to an RDS instance, you must create a database and an account on the RDS instance. Make sure that the created database has the same properties as the on-premises database. In addition, make sure that the created account has the same permissions on the created database as the account that is authorized to manage the on-premises database.
Procedure
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane of the page that appears, click Databases.
On the page that appears, click Create Database.
Configure the following parameters.
Parameter
Description
Database Name
The name of the database. It can contain up to 63 characters in length.
It can contain lowercase letters, digits, hyphens (-), and underscores (_).
It must start with a lowercase letter and end with a lowercase letter or a digit.
Supported Character Set
The character set that is supported by the database.
Collate
The rule based on which strings are sorted.
Ctype
The type of character supported by the database.
Authorized By
The owner of the database. The owner has all permissions on the database.
Description
The description of the database.
Click Create.
You can view information about the database that you create on the Databases page.
Parameter
Description
ConnLimit
The maximum number of concurrent requests that is allowed by the database. By default, the number of concurrent requests is unlimited. If you want to change the value of this parameter, you can use a privileged account to log on to the database and execute the
ALTER DATABASE <Database name> CONNECTION LIMIT <Number of concurrent requests>;
statement.Tablespace
The tablespace to which the database belongs. Default value:
pg_default
. The paths of tablespaces cannot be viewed and modified.If you use methods such as the cloud migration feature to migrate data from a self-managed database to the database on your RDS instance, the tablespace name of the self-managed database is the same as that of the database on your RDS instance. You can change the name of the tablespace to which a database or a table belongs to
pg_default
. For more information about the cloud migration feature, see Use the cloud migration feature for an ApsaraDB RDS for PostgreSQL instance.
What to do next
Connect to the RDS instance. For more information, see Connect to an ApsaraDB RDS for PostgreSQL instance.