All Products
Search
Document Center

:Register an on-premises database by using a public endpoint

Last Updated:Jun 13, 2025

This topic describes how to register an on-premises database as an instance in Data Management (DMS) by using the public endpoint of the database.

Prerequisites

  • DMS is activated.
  • You are a DMS administrator or a database administrator (DBA) in DMS. For more information about how to view your role, see View system roles.

Precautions

  • If the endpoint of a database is exposed to the Internet, security issues may occur. We recommend that you use a public endpoint to register an on-premises database for testing purposes only.
  • If you use a public endpoint to register an on-premises database, configure a whitelist for the database to prevent unauthorized access.
  • DMS allows you to register the following types of databases as instances by using public endpoints:

    MySQL, SQL Server, PostgreSQL, Oracle, MongoDB, Redis, OceanBase, ClickHouse, MariaDB, Dameng database (DM), Db2, openGauss, OceanBase MySQL, OceanBase Oracle, OceanBase ODP, and Hive.

  • We recommend that you register your on-premises database by using Database Gateway, which is more secure and convenient. Database Gateway is in public preview and is free of charge. For more information, see Register a self-managed database deployed in a data center by using Database Gateway.

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. Click the Public Network tab and select a database type.
    Note In this example, MySQL is selected. The configuration items of other types of databases may be different.
  4. In the Add Instance dialog box, set the parameters that are described in the following table.
    Basic InformationData SourceThe source of the database instance. Set this parameter to Public Network.
    Database TypeThe type of the database instance.
    Instance RegionThe region in which the database instance resides. Select an Alibaba Cloud region that is geographically close to the location where the database is deployed.
    Login AddressThe public endpoint that is used to connect to the database.
    PortThe port that is used to connect to the database.
    Database AccountThe username of the account that you use to log on to the database.
    Database passwordThe password of the account that you use to log on to the database.
    Control ModeThe control mode that is used to manage the database in DMS. For more information, see Control modes.
    Sensitive Data ProtectionSpecifies whether to enable the sensitive data protection feature. This feature allows you to manage and mask sensitive data. For more information, see Overview.
    Advanced InformationEnvironment typeThe environment of the database.
    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 instance 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 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 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 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.
    After the preceding steps are complete, the database instance is registered in DMS. Then, you can view and manage your database instance in the instance list in the DMS console.