edit-icon download-icon

Create database

Last Updated: Dec 06, 2017


Create a new database in an instance. The interface must meet the following conditions, otherwise the call will fail:

  • The instance status is Running.

  • The instance is not locked.

  • The maximum number of databases in the instance is not exceeded.

  • The instance type is primary instance.

Note: Users of PostgreSQL and PPAS instances are permitted to perform the CREATE DATABASE operation through SQL. Therefore, this interface does not support PostgreSQL and PPAS.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: CreateDatabase.
DBInstanceId String Yes Instance ID.
DBName String Yes Name of the database requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter
and have no more than 64 characters. For other invalid characters, see Forbidden keyword table.
CharacterSetName String Yes Character set. The value range is limited to the following:
MySQL type:
utf8mb4 (included in versions 5.5 and 5.6).
SQLServer type:
DBDescription String No Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.


  • Request example

    1. https://rds.aliyuncs.com/?Action=CreateDatabase
    2. &CharacterSetName=gbk
    3. &DBName=testdb02
    4. &DBInstanceId=riauvjz6zajfiq6ba1370329449201
    5. &<[Public Request Parameters]>
  • Return example

    XML format:

    1. <CreateDatabaseResponse>
    2. <RequestId>5A77D650-27A1-4E08-AD9E-59008EDB6927</RequestId>
    3. </CreateDatabaseResponse>

    JSON format:

    1. {
    2. "RequestID":"5A77D650-27A1-4E08-AD9E-59008EDB6927"
    3. }
Thank you! We've received your feedback.