You can call this operation to delete a database under an instance.

This operation must meet the following requirements:

  • The instance is in the running state.
  • The instance is a master instance.
  • The database engine is MySQL, SQL Server, or MariaDB.
Note This operation is not applicable to ApsaraDB RDS for PostgreSQL. You can run the DROP DATABASE SQL statement to delete databases.


You can use OpenAPI Explorer to perform debugging. OpenAPI Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteDatabase

The operation that you want to perform. Set this parameter to DeleteDatabase.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

DBName String Yes testdb01

The name of the database.

Response parameters

Parameter Type Example Description
RequestId String 07F6177E-6DE4-408A-BB4F-0723301340F3

The ID of the request.


Sample requests

http(s):// Action=DeleteDatabase
&<Common request parameters>

Successful response examples

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.