This topic describes how to delete a database for an RDS for MySQL instance by using the RDS console or running an SQL statement. Each method applies to different types of instances. You can choose a suitable method based on the RDS instance whose database you want to delete.

Delete a database by using the RDS console

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Databases.
  5. Find the database you want to delete, and in the Actions column click Delete.
  6. In the displayed dialog box, click Confirm.

Delete a database by running an SQL statement

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target RDS instance is located.
    选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the upper-right corner, click Log On to DB go to the RDS Database Logon page of the DMS console.
  5. On the RDS Database Logon page, check the connection address and port information. If the information is correct, enter the database username and password.

    Parameter description:

    • Databases Username: the name of the premier account.
    • Password: the password for the premier account.
      Note You can view the connection address and port information of this account on the Basic Information page of the instance in the RDS console.
  6. Enter the verification code and click Log On.
    Note If you want the browser to remember the password, select Remember Password before you click Log On.
  7. If DMS prompts you to add the IP address segment of the DMS server to an IP address whitelist of the RDS instance, click Configure Whitelist. For more information about how to manually configure the whitelist, see Configure a whitelist.
  8. Click Log On.
  9. In the top navigation bar, choose SQL Operations > SQL Window.
  10. Run the following command to delete a database:
    DROP DATABASE <database name>;
  11. Click execute to delete the database.

APIs

API Description
DeleteDatabase Used to delete a database for an RDS instance.