Before you start to use ApsaraDB for RDS, you must create databases and accounts on your RDS instance. This topic describes how to create a database on an ApsaraDB RDS for PPAS instance.
- Databases on the same RDS instance share all of the resources that belong to the instance. You can create and manage a number of databases on your RDS instance by using SQL statements.
- If you want to migrate data from an on-premises database to your RDS instance, you must create a database and an account on your RDS instance. Make sure that the database and the account have the same names as the on-premises database and its authorized account.
- Connect to your RDS instance. For more information, see Connect to an ApsaraDB RDS for PPAS instance.
- In the SQL window, execute the following statement to create a database:
CREATE DATABASE name [ [ WITH ] [ OWNER [=] user_name ] [ TEMPLATE [=] template ] [ ENCODING [=] encoding ] [ LC_COLLATE [=] lc_collate ] [ LC_CTYPE [=] lc_ctype ] [ TABLESPACE [=] tablespace_name ] [ CONNECTION LIMIT [=] connlimit ] ]
For example, if you want to create a database named test, execute the following statement.
create database test;