All Products
Search
Document Center

Data Management:Manage databases

Last Updated:Feb 04, 2024

You can create, modify, or delete databases in the Data Management (DMS) console in a visualized manner 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

DMS allows you to manage MySQL databases, MariaDB databases, and AnalyticDB for MySQL databases. For more information about the supported database types, see the Supported database types section of the "Supported database types and features" topic.

  1. Log on to the DMS console V5.0.
  2. In the left-side instance list of the homepage, right-click the instance that you want to manage and select Database management.

  3. Perform the following operations based on your business requirements:

    • Create a database

      1. Click Create DB.

      2. In the Create database dialog box, configure the Database Name, Character set, and Validation rules parameters.创建数据库

        Note

        If an instance is managed in Security Collaboration mode, you must configure a security rule that allows the CREATE DATABASE command to be executed. For more information, see SQL Correct.

      3. Click OK.

    • Modify a database

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

    • Delete a database

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

      Note

      If an instance is managed in Secure Collaboration mode, you must configure a security rule that allows the DROP DATABASE command to be executed. For more information, see SQL Correct.

Manage MongoDB databases

  1. Log on to the DMS console V5.0.
  2. In the left-side instance list of the homepage, right-click the instance that you want to manage and select Database management.

  3. Perform the following operations based on your business requirements:

    • Create a database

      1. Click Create DB.

      2. In the Create database dialog box, configure the Database Name and Collection Name parameters.创建MongoDB库

        Note

        A collection is created when the database is created. You can configure the Collection Name parameter to specify the collection name. If you leave the Collection Name parameter empty, a collection named test is created by default.

      3. Click OK.

    • Delete a database

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

Manage PostgreSQL databases

DMS allows you to manage PostgreSQL databases and AnalyticDB for PostgreSQL databases.

You can also manage the schemas of a PostgreSQL database.

  1. Log on to the DMS console V5.0.
  2. In the left-side instance list of the homepage, 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 homepage. Right-click the database that you want to manage and select Mode Management.

  3. Perform the following operations based on your business requirements:

    • Manage databases

      • Create a database

        1. Click Create DB.

        2. In the Create database dialog box, configure the following parameters: Database Name, Connection Limit, Table Space, Character set, and Remarks.创建PG库

          Note

          The following section describes some of the parameters.

          • Connection Limit: the maximum number of concurrent connections to the database. Default value: -1, which indicates that the database can be accessed without a limited number of concurrent connections.

          • Table Space: the tablespace of the database. Default value: default tablespace.

          For more information, visit the PostgreSQL official website.

        3. Click OK.

      • Modify a database

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

      • Delete a database

        On the Database management page, find the database that you want to manage 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 page, click Create Schema.

        2. In the dialog box that appears, configure the Schema Name, Owner, and Remarks parameters.

          Note

          By default, the owner of a schema is the user who creates the schema.

        3. Click OK.

      • Modify a schema of a database

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

      • Delete a schema of a database

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

What to do next

You can also create an account for a database and grant the account specific permissions on the database. For more information, see the topics under Account permission management.

Note

DMS provides the account management feature only for MySQL, PostgreSQL, and MongoDB databases. For databases of other engines, go to the corresponding console to manage the database accounts.