This topic provides an overview of database management, including how to create and delete databases.

You can create and manage all databases in the ApsaraDB for PolarDB console.

Create a database

  1. Log on to the ApsaraDB for PolarDB console.
  2. Select a region.
  3. Find the target cluster and click the cluster ID in the Cluster Name column.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Click Create Database.
  6. In the dialog box that appears, set parameters for creating a database. The following table describes the parameters.
    Parameter Description
    Database Name
    • It must start with a letter and end with a letter or digit.
    • It can contain lowercase letters, digits, underscores (_), and hyphens (-).
    • It must be 2 to 64 characters in length.
    • Each database name in an instance must be unique.
    Supported Character Set Select utf8mb4, utf8, gbk, or latin1.

    You can also select other required character sets from the drop-down list on the right.

    Authorized Account Select the account that you want to authorize for accessing this database. You can leave this parameter blank, and bind an account after the database is created.
    Note Only standard accounts are available in the drop-down list. The privileged account has all the permissions on all databases. You do not need to authorize the privileged account to access the database that you create.
    Account Permission Select the permission that you want to grant to your account. Valid values: Read and Write | Read Only| DML Only.
    Description Enter the remarks of the database to facilitate subsequent database management. The requirements are as follows:
    • The description cannot start with http:// or https://.
    • The description must start with an uppercase or lowercase letter or a Chinese character.
    • The description can contain uppercase or lowercase letters, Chinese characters, digits, underscores (_), and hyphens (-).
    • The description must be 2 to 256 characters in length.
    Create Database
  7. Click OK.

Delete a database

  1. Log on to the ApsaraDB for PolarDB console.
  2. Select a region.
  3. Find the target cluster and click the cluster ID in the Cluster Name column.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Find the target database and click Delete in the Actions column.
  6. In the dialog box that appears, click OK.

Related API operations

API operation Description
CreateDatabase Creates a database.
DescribeDatabases Views the database list.
ModifyDBDescription Modifies the description of a database.
DeleteDatabase Deletes a database.