This topic describes how to create a database in a PolarDB-X instance.

Procedure

  1. Log on to the PolarDB-X console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. On the Instances page, click the PolarDB-X 2.0 tab.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose ConfigurationManagement > Database management.
  6. In the upper-left corner of the Database management page, click Create database.
  7. In the panel that appears, configure the parameters. The following table describes the parameters.
    Parameter Description
    Database name The name of the database.
    Note The database name must meet the following requirements:
    • The name must be 2 to 32 characters in length and can contain lowercase letters, digits, and underscores (_).
    • The name must start with a lowercase letter and end with a lowercase letter or a digit.
    • The name must be unique within the instance.
    • The name cannot be test because test is a keyword that is reserved.
    Supporting character sets You can select utf8, gbk, latin1, or utf8mb4.
    Authorized account The account that you want to use to log on to the database.
    Note
    • Only standard accounts are available in the drop-down list. The privileged account of an instance has all permissions on all databases in the instance. You do not need to authorize the privileged account to access a database.
    • If no standard accounts are available, you can click Create a new account to create a standard account. For more information, see Create an account.
    Account permission The permissions that you want to grant to the specified account. You can select Read and write, Read only, DDL only, or DML only.
    Mode You can select AUTO or DRDS. For more information, see Databases in AUTO mode and DRDS mode.
    Descr Optional. The description of the database. The description can help you identify the database. The description can be up to 256 characters in length.
  8. Click OK.