Create database

Description

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:utf8gbklatin1utf8mb4 (included in versions 5.5 and 5.6).SQLServer type:Chinese_PRC_CI_ASChinese_PRC_CS_ASSQL_Latin1_General_CP1_CI_ASSQL_Latin1_General_CP1_CS_ASChinese_PRC_BIN

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.