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, 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 insert, delete, modify, and query data in an instance and change schemas, a DMS user must have sufficient 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 various types of ApsaraDB instances. For more information, see Supported database types and features.

Procedure

  1. Log on to the DMS console.
  2. On the Instance List tab, click New.
  3. Click the Cloud tab and select a database type.
  4. 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 Region The region where the database instance resides.
    Entry mode The method that you can use to connect 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 server 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.
    Database Account The username that you can use to connect to the database.
    Note You will use the specified database account to perform operations such as read and write operations on the data of the database instance in DMS. You must specify a database account that has the required permissions.
    Database password The password that you can use to connect 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.
    Lock-free Schema Change Specifies whether to allow the database instance to change schemas without the need to lock tables. For more information, see DDL-based lockless change.
    Enable SSL Specifies whether to allow DMS to connect to the database instance by using SSL connections. After this feature is enabled, DMS can connect to the database instance by using SSL connections.

    SSL encrypts network connections at the transport layer to improve the security and integrity of data in transit. However, SSL increases the network connection response time.

    Before you use SSL connections, make sure that the SSL encryption feature is enabled for the database instance. Valid values:

    • Default (DMS automatically checks whether self-negotiation is enabled for the database instance.): DMS automatically checks whether the SSL encryption feature is enabled for the database instance. If the SSL encryption feature is enabled, DMS connects to the database instance by using SSL connections. Otherwise, DMS connects to the database instance without encryption.
    • Open: allows DMS to connect to the database instance by using SSL connections. This parameter is invalid if you disable the SSL encryption feature for the database instance.
    • Close: does not allow DMS to connect to the database instance by using SSL connections.
    Note This parameter takes effect only for MySQL databases.
    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.
  5. After you configure the preceding information, 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.
  6. In the Whitelist issues message, click Configure Whitelist.
    Configure Whitelist
    Note DMS adds its own server 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.
  7. Click Test connection.
  8. 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 instance list of the DMS console.