The example in this topic shows you how to register a database instance that is owned by another Alibaba Cloud account in Data Management (DMS). An ApsaraDB RDS for MySQL instance is used in the example.

Prerequisites

  • Supported database types are ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, ApsaraDB RDS for PostgreSQL, ApsaraDB for MongoDB, ApsaraDB for Redis, ApsaraDB for Redis Enhanced Edition (Tair), PolarDB-X (formerly Distributed Relational Database Service, DRDS), ApsaraDB for OceanBase, PolarDB for MySQL, PolarDB for Oracle, PolarDB for PostgreSQL, AnalyticDB V2.0, AnalyticDB for MySQL V3.0, AnalyticDB for PostgreSQL, Data Lake Analytics (DLA), ApsaraDB for ClickHouse, ApsaraDB for MariaDB, ApsaraDB RDS for PPAS, MaxCompute, MaxCompute Hologres, ApsaraDB for Cassandra, Lindorm SQL, Lindorm Phoenix, Lindorm CQL, Lindorm TSTB, Graph Database, and ApsaraDB for Memcache.
  • You are a database administrator (DBA) or a DMS administrator. For more information about how to view your roles, see View system roles.

Scenario

Your enterprise has multiple Alibaba Cloud accounts, and you want to use your own Alibaba Cloud account to manage the database instances that belong to different accounts in a centralized manner.

Procedure

  1. Log on to the DMS console V5.0.
  2. On the Home page of the DMS console, click the add icon in the left-side instance list.
    Note You can also choose Data Assets > Instances in the top navigation pane. On the Instance List tab of the Instances page, click + New.
  3. In the Add Instance dialog box, click the Cloud tab and select a database instance type. MySQL is selected in this example.
  4. Set the following parameters for the database instance.
    SectionParameterDescription
    Basic InformationData SourceThe source of the database instance. Cloud is selected in this example.
    Database TypeThe type of the database instance. MySQL is selected in this example.
    Instance Region
    1. The region in which the database instance resides.
    2. Click Cross-Alibaba Cloud account instances.
    Other primary accountsThe Alibaba Cloud account to which the database instance belongs.
    Note If the Alibaba Cloud account is not in the list, you can click Add User to add the Alibaba Cloud account that is used to purchase the database instance to DMS. For more information, see Add users.
    Entry modeThe method that you can use to register the database instance. Valid values: Instance ID and Connection string address. This parameter is set to Connection string address in this example.
    Instance ID or Connection string addressThe 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 IP address whitelist of the ApsaraDB instance. If the IP addresses and CIDR blocks fail to be added, you need to manually add them. For information, see Configure an IP address whitelist.
    Database AccountThe username that you use to log on to the database instance.
    Database passwordThe password of the account that you use to log on to the database instance.
    Control ModeThe control mode that is used to manage the database instance. For more information, see Control modes.
    Sensitive Data ProtectionSpecifies whether to enable the sensitive data protection feature for the database instance. For more information, see Overview.
    Advanced InformationEnvironment typeThe environment of the database instance.
    Instance NameThe name of the database instance in DMS.
    Lock-free Schema ChangeSpecifies whether to enable the lock-free schema change feature for the database instance. For more information, see Perform lock-free DDL operations.
    Enable SSLSpecifies whether to allow DMS to connect to the database by using SSL connections. 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. If the SSL encryption feature is enabled, DMS connects to the database by using SSL connections. Otherwise, DMS connects to the database without encryption.
    • Open: DMS connects to the database instance by using SSL connections. This value is invalid if the SSL encryption feature is disabled for the database.
    • Close: DMS does not connect to the database by using SSL connections.
    Note This parameter is displayed only if you set the Database Type parameter to MySQL.
    DBAThe DBA of the database. 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 is terminated to protect the database instance.
    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 is terminated to protect the database instance.
    Note After you set the parameters in the Basic Information section, click Test connection in the lower part of the dialog box. If the connection test fails, modify the parameters as prompted and try again.
  5. Click Submit.
    Note After the database instance is registered in DMS, the database instance is accessible to all DMS users that are managed by the current Alibaba Cloud account.