You can create, modify, or delete databases in the Data Management (DMS) console, without the need to execute SQL statements.

Prerequisites

You are a DMS administrator, a database administrator (DBA), or a regular user such as the owner of an instance. For more information, see System roles.

Manage MySQL databases

The following types of databases are used: MySQL series, MariaDB series, or AnalyticDB for MySQL. For more information, see Supported database types.

  1. Log on to the DMS console.
  2. In the left-side navigation pane of the DMS console, right-click the instance that you want to manage and select Database management.
  3. Perform the following operations as needed:
    • Create a database
      1. Click Create DB.
      2. Set the Database Name, Character set, and Validation rules parameters. Create database dialog box
        Note If an instance is managed in Security Collaboration mode, you must configure a security rule that allows the CREATE DATABASE statement to be submitted for execution. For more information, see SQL correct.
      3. Click OK.
    • Modify a database

      On the Database management tab, find the database whose information you want to modify and click Edit in the Operation column. In the Edit Database dialog box, you can modify the Character set or Validation rules parameter for the database.

    • Delete a database

      On the Database management tab, find the database that you want to delete and click Delete in the Operation column. In the message that appears, click Confirm.

      Note If an instance is managed in Security Collaboration mode, you must configure a security rule that allows the DROP DATABASE statement to be submitted for execution. For more information, see SQL correct.

Manage MongoDB databases

MongoDB databases are used.

  1. Log on to the DMS console.
  2. In the left-side navigation pane of the DMS console, right-click the instance that you want to manage and select Database management.
  3. Perform the following operations as needed:
    • Create a database
      1. Click Create DB.
      2. Set the Database Name and Collection Name parameters. Create database dialog box
        Note In the Create database dialog box, you must specify a value for the Collection Name parameter. If you leave the parameter empty, a collection named test is created by default.
      3. Click OK.
    • Delete a database

      On the Database management tab, find the database that you want to delete and click Delete in the Operation column. In the message that appears, click Confirm.

Manage PostgreSQL databases

Native PostgreSQL or AnalyticDB for PostgreSQL databases are used.

DMS allows you to manage PostgreSQL databases and the schemas of the databases.

  1. Log on to the DMS console.
  2. In the left-side navigation pane of the DMS console, right-click the instance that you want to manage and select Database management.
    To manage the schemas of a PostgreSQL database, click the instance that you want to manage in the left-side instance list of the DMS console. Right-click the database that you want to manage and select Mode Management.
  3. Perform the following operations as needed:
    • Manage databases
      • Create a database
        1. Click Create DB.
        2. Set the Database Name, Connection Limit, Table Space, Character set, and Remarks parameters. Create database dialog box
          Note

          Parameter description:

          • Connection Limit: the maximum number of concurrent connections to the database. The default value is -1, which indicates that the database can be accessed without limits.
          • Table Space: the tablespace of the database. Default value: default tablespace.
          For more information, see the PostgreSQL official website.
        3. Click OK.
      • Modify a database

        On the Database management tab, find the database whose information you want to modify and click Edit in the Operation column. In the Edit Database dialog box, you can modify the parameters of the database, such as Connection Limit and Table Space.

      • Delete a database

        On the Database management tab, find the database that you want to delete and click Delete in the Operation column. In the message that appears, click Confirm.

    • Manage schemas
      • Create a schema for a database
        1. On the Mode Management tab, click Create Schema.
        2. Set the Schema Name, Owner, and Remarks parameters.
          Note By default, the owner of a schema is the user that creates the schema.
        3. Click OK.
      • Modify a schema of a database

        On the Mode Management tab, find the schema that you want to modify and click Edit in the Operation column. In the Edit mode dialog box, you can modify the Schema Name, Owner, and Remarks parameters.

      • Delete a schema of a database

        On the Mode Management tab, find the schema that you want to delete and click Delete in the Operation column. In the message that appears, click Confirm.