Create and delete databases on an ApsaraDB MyBase for MySQL instance from the console or the CLI.
Prerequisites
Before you begin, ensure that you have:
-
An ApsaraDB MyBase for MySQL instance. To create one, see Create an ApsaraDB MyBase for MySQL instance
Create a database
-
Log on to the ApsaraDB for MyBase console.
-
In the upper-left corner of the page, select a region.
-
In the left-side navigation pane, choose Instances > MySQL.
-
Find the instance and click Details in the Actions column. In the left-side navigation pane of the ApsaraDB RDS instance page, click Databases.
-
Click Create Database.

-
In the Create Database dialog box, configure the following parameters.
Parameter Description Database name The name must meet the following requirements: up to 64 characters; starts with a lowercase letter and ends with a lowercase letter or digit; can contain lowercase letters, digits, underscores ( _), and hyphens (-); must be unique within the instance.Supported character set Select a character set based on your requirements. Authorized account Select a standard account to authorize. You can also click Create Account to create one (see Create a database account), or leave the field blank and authorize an account after the database is created (see Modify the permissions of a standard account on an ApsaraDB RDS for MySQL instance). The drop-down list shows only standard accounts. The privileged account has full permissions on all databases and does not require authorization. Description (Optional) A description to help identify the database. Up to 256 characters. 
-
Click Create.
Delete a database
Delete from the console
Deleting a database is irreversible. Back up any data you need before proceeding.
-
Log on to the ApsaraDB for MyBase console.
-
In the upper-left corner of the page, select a region.
-
In the left-side navigation pane, choose Instances > MySQL.
-
Find the instance and click Details in the Actions column. In the left-side navigation pane of the ApsaraDB RDS instance page, click Databases.
-
Find the database and click Delete in the Actions column.
-
In the dialog box that appears, click OK.
-
Enter the verification code sent to your mobile phone.
Delete from the CLI
-
Connect to the instance. For instructions, see Use a database client or the CLI to connect to an ApsaraDB MyBase for MySQL instance.
-
Run the following statement to delete the database:
DROP DATABASE <database_name>;Replace
<database_name>with the name of the database to delete.