All Products
Search
Document Center

ApsaraDB for MyBase:Manage databases

Last Updated:Jul 14, 2023

This topic describes how to manage ApsaraDB MyBase for MySQL databases.

Prerequisites

An ApsaraDB MyBase for MySQL instance is created. For more information, see Create an ApsaraDB MyBase for MySQL instance.

Create a database.

  1. Log on to the ApsaraDB for MyBase console.

  2. In the upper-left corner of the page, select a region.

  3. In the left-side navigation pane, choose Instances > MySQL.

  4. Find the instance on which you want to create a database and click Details in the Actions column to go to the ApsaraDB RDS instance. In the left-side navigation pane, click Databases.

  5. On the page that appears, click Create Database.

    Database management
  6. In the Create Database dialog box, configure the parameters described in the following table.

    Parameters

    Parameter

    Description

    Database Name

    • The name can be up to 64 characters in length.

    • The name must start with a lowercase letter and end with a lowercase letter or a digit.

    • The name can contain lowercase letters, digits, underscores (_), and hyphens (-).

    • The name must be unique within the instance.

    Supported Character Set

    Select a character set based on your business requirements.

    Authorized Account

    Select the authorized account of the database. Alternatively, you can perform one of the following operations:

    Note

    The Authorized Account drop-down list displays only the standard accounts that are created on your instance. The privileged account has all permissions on all databases and does not require authorization.

    Description

    Optional. Enter information about the database to facilitate subsequent management. The description can be up to 256 characters in length.

  7. Click Create.

Use the console to delete a database

  1. Log on to the ApsaraDB for MyBase console.

  2. In the upper-left corner of the page, select a region.

  3. In the left-side navigation pane, choose Instances > MySQL.

  4. Find the instance on which you want to create a database and click Details in the Actions column to go to the ApsaraDB RDS instance. In the left-side navigation pane, click Databases.

  5. Find the database that you want to delete and click Delete in the Actions column.

  6. In the message that appears, click OK.

  7. Enter the verification code that you receive on your mobile phone.

Use the CLI to delete a database

  1. Connect to the instance. For more information, see Use a database client or the CLI to connect to an ApsaraDB MyBase for MySQL instance.

  2. Execute the following statement to delete a database:

    drop database <database name>;