Data Management (DMS) allows you to register database instances. You can register and manage your ApsaraDB instances in the DMS console.

Prerequisites

  • An ApsaraDB instance is created, such as an ApsaraDB RDS for MySQL instance.
  • DMS is activated.
  • You are a DMS administrator or a database administrator (DBA) in DMS.
  • The AliyunRDSFullAccess permission is obtained to register an ApsaraDB RDS for MySQL instance with DMS as a RAM user. For more information, see Grant permissions to a RAM user.

Background information

  • A database instance can be managed by using multiple Alibaba Cloud accounts. Before you register the database instance in the DMS console, go to the User tab and add the Alibaba Cloud accounts that are allowed to manage the database instance as DMS users. For more information, see Register a database instance that is accessible to multiple Alibaba Cloud accounts.
  • To allow DMS users to manage database instances in the DMS console, you must grant permissions to the DMS users based on your actual needs. For more information about the syntax that you can use to grant permissions, see the official documentation of each type of database. The DMS users are required to have the following permissions:
    • To manage all the databases of an instance, a DMS user must have permissions on all the databases.
    • To manage one or more databases of an instance, a DMS user must have permissions on the specific databases.
    • To add, delete, modify, and query data in an instance and change schemas, a DMS user must have sufficient data manipulation language (DML) permissions.
    • To perform operations on objects such as views, stored procedures, triggers, and functions in an instance, a DMS user must have sufficient permissions on these objects.
  • We recommend that you create a separate database account when you register a database instance.
  • To avoid interference, do not add spaces or special characters before or after the information that you enter when you register a database instance.
  • DMS allows you to register the following types of ApsaraDB instances:
    • ApsaraDB RDS for MySQL
    • ApsaraDB RDS for SQL Server
    • ApsaraDB RDS for PostgreSQL
    • ApsaraDB for MongoDB
    • ApsaraDB for Redis
    • PolarDB-X
    • ApsaraDB OceanBase for MySQL
    • ApsaraDB OceanBase for Oracle
    • PolarDB for MySQL
    • PolarDB-O
    • PolarDB for PostgreSQL
    • AnalyticDB for MySQL V2.0
    • AnalyticDB for MySQL V3.0
    • AnalyticDB for PostgreSQL
    • Data Lake Analytics (DLA)
    • ClickHouse
    • ApsaraDB RDS for MariaDB
    • ApsaraDB RDS for PPAS
    • MaxCompute
    • ApsaraDB for HBase V2.0 Standard Edition
    • ApsaraDB for Lindorm
    • ApsaraDB for Cassandra

Procedure

  1. Log on to the DMS console.
  2. In the upper-left corner, move the pointer over Add instance / Batch entry and select Add instance.

    The Add instance dialog box appears.

    Note You can also use one of the following methods to open the Add instance dialog box:
    • Method 1: In the upper-left corner, move the pointer over the + icon and select Add instance.
    • Method 2: In the top navigation bar, choose System > Instance. On the Instance List tab, click New.
  3. Click the Cloud tab.
  4. On the Cloud tab, select a database type.
  5. In the Add instance dialog box, set the parameters that are described in the following table.
    Section Parameter Description
    Basic Information Data source The source of the database instance. In this example, select Cloud.
    Database type The type of the database instance.
    Instance Area The region where the database instance resides.
    Entry mode The method that you can use to log on to the database instance. Valid values: Instance ID and Connection string address.
    Instance ID or Connection string address The ID of the database instance or the endpoint of the database instance.
    Note When you register an ApsaraDB instance, DMS adds its own IP addresses and Classless Inter-Domain Routing (CIDR) blocks for the specified region to the whitelist of IP addresses that are allowed to connect to the ApsaraDB instance. If the IP addresses and CIDR blocks fail to be added, manually add them. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for MySQL instance and Configure an IP address whitelist.
    Database account The username that you can use to log on to the database.
    Database password The password that you can use to log on to the database.
    Control Mode The control mode that is used to manage the database instance in DMS. For more information, see Control modes.
    Advanced information Environment type The environment of the database instance.
    Note For more information, see Change the environment type of an instance.
    Instance Name The name that you specify for the database instance.
    Note When you register an ApsaraDB instance for the first time, the name of the ApsaraDB instance is synchronized to DMS. DMS does not synchronize the name when you perform subsequent operations. You can change the name of the instance in the DMS console. For more information, see Modify an instance.
    Enable DSQL Specifies whether to enable the cross-database query feature for the database instance. For more information, see Cross-database query.
    OnlineDDL Specifies whether to allow the database instance to change schemas without the need to lock tables. For more information, see Change schemas without locking tables.
    DBA The DBA of the database instance. The DBA can grant permissions to users.
    query timeout(s) The timeout period for the execution of an SQL query statement. If the execution of an SQL query statement lasts longer than the specified timeout period, the execution of the statement is terminated to protect the database.
    export timeout(s) The timeout period for the execution of an SQL export statement. If the execution of an SQL export statement lasts longer than the specified timeout period, the execution of the statement is terminated to protect the database.
  6. Complete the configurations and click Test connection in the lower-left corner of the Basic Information section.
    Note If the connectivity test fails, check the specified parameter values based on the error message.
  7. In the Whitelist issues message, click Configure Whitelist.
    Configure Whitelist
    Note DMS adds its own IP addresses and CIDR blocks for the specified region to the whitelist of IP addresses that are allowed to connect to the ApsaraDB instance. If the IP addresses and CIDR blocks fail to be added, manually add them. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for MySQL instance and Configure an IP address whitelist.
  8. Click Test connection.
  9. After the connectivity test is passed, click Submit.
    Note After the preceding steps are complete, the ApsaraDB instance is registered with DMS. Then, you can view and manage your database instance in the left-side navigation pane of the DMS console.