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

Create a database

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster resides.
  3. Find the cluster, and then click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Click Create Database.
  6. In the Create Database panel, set the following parameters.
    Parameter Description
    Database Name
    • The name must start with a letter and end with a letter or digit.
    • The name can contain lowercase letters, digits, underscores (_), and hyphens (-).
    • The name can contain up to 64 characters in length.
    • The name must be unique in the PolarDB instance.
    Supported Character Set Select the character set supported by the database, such as utf8mb4, utf8, gbk, and latin1.
    Authorized Account Select the account to be authorized to access this database. You can leave this parameter empty and bind an account after the database is created.
    Note Only standard accounts are available in the drop-down list. The privileged accounts have all the permissions on all databases. You do not need to authorize the privileged accounts to access the database.
    Account Permission Select the permission that you want to grant to the selected account. Valid values: Read&Write, ReadOnly, DMLOnly, DDLOnly, or ReadOnly&Index.
    Description Enter a description of the database to facilitate subsequent database management. The description must meet the following requirements:
    • It cannot start with http:// or https://.
    • It must be 2 to 256 characters in length.
  7. Click OK.

Delete a database

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster resides.
  3. Find the cluster, and then click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > 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.

Related API operations

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