All Products
Search
Document Center

Data Management:Add a third-party or self-managed database

Last Updated:Aug 27, 2026

Data Management (DMS) supports adding third-party or self-managed databases to DMS, including databases with public IP addresses, ECS-hosted self-managed instances, databases connected via a database gateway, databases connected via a VPC gateway, and MyBase database instances. This topic describes how to add third-party or self-managed databases to DMS.

Prerequisites

Usage notes

  • To avoid errors, do not add spaces or other characters before or after the information you enter.

  • Databases exposed to the Internet are vulnerable to attacks. If you need to connect to your database over the Internet, add an IP address whitelist to improve its security.

  • If the instance source is a database gateway or a VPC PrivateLink, prepare the corresponding resources in advance.

  • When the instance source is MyBase Open Edition, you can only add MyBase on ACK instances.

Database account permissions

We recommend that you create a new database account to avoid sharing accounts that are already in use. The database account permissions are as follows:

  • To manage all databases in an instance, grant permissions for all databases of the entire instance.

  • To manage one or more databases in an instance, you can specify these databases in the authorization scope.

  • To perform operations such as creating, deleting, updating, and querying data in an instance, and modifying table structures, you need to grant the account sufficient DML and DDL permissions.

  • To perform operations on objects such as views, stored procedures, triggers, and functions, grant the account sufficient object operation permissions.

Procedure

In this example, the database is MySQL and the instance source is the Internet.

  1. Log in to DMS 5.0.

  2. In the Database Instances area on the left side of the console home page, click the Add Instanceadd icon.

    Note

    Alternatively, on the top menu bar, choose Data Assets > Instances and then click Add.

  3. On the Add Instance page, set Data Source to Third-party/Self-managed, and then configure the following parameters:

    Basic information

    Parameter

    Description

    Database type

    Select the database instance type. This example uses MySQL.

    Instance source

    DMS currently supports several instance sources, such as Internet, ECS-hosted self-managed instance, database gateway, VPC PrivateLink, and MyBase. In this example, Internet is selected.

    Instance region

    Select the region where the database instance is located.

    Login address

    Enter the corresponding address and instance ID based on the instance source. In this example, the Instance Source is set to Internet, so you must enter the public address (the Login Address ).

    Note

    The labels for the configuration options differ depending on the instance source.

    Port

    Enter the service port of the target database.

    Secure hosting

    Select whether to enable security hosting for the instance.

    • Enable: When enabled, this feature prevents users from directly accessing database accounts and passwords and allows for granular permission control at the instance, database, table, and row levels. For more information, see Security Hosting.

    • Do not enable (Not recommended): This option requires you to frequently log in with your database account and password, which may affect normal functionality.

    Database account

    Enter the login account for the target database. DMS uses this account to read, write, or perform other operations on the data. Provide an account with the required permissions.

    Database password

    Enter the password for the target database account.

    Advanced Feature Pack

    Select a feature pack based on your business requirements.

    • Security Collaboration or Stable Change (Select one): Security Collaboration includes all the capabilities of Stable Change. It provides DevOps features and allows you to flexibly customize development and approval processes. Stable Change provides solutions for more stable database operations, such as lock-free changes and SQL reviews. For more information, see Control Mode.

      Note

      If you do not select the Security Collaboration and Stable Change feature packs, the instance defaults to Flexible Management mode.

    • Sensitive Data Protection: This feature allows you to govern and desensitize sensitive data. Enable this feature based on your business needs. For more information, see Enable Sensitive Data Protection.

    Security rules

    This parameter appears if you select the Security Collaboration feature pack.

    You can select system-default or custom security rules for fine-grained control over the database.

    Classification and grading template

    This parameter appears if you select the Sensitive Data Protection feature pack.

    You can bind a classification and grading template to an instance to identify whether fields in the databases and tables of the instance comply with the identification rules in the template. If a field complies, it is tagged with a classification and grading label to protect fields with high sensitivity levels.

    Advanced information

    Parameter

    Description

    Environment type

    Select the database environment type. For more information about instance environment types, see Instance environment types.

    Instance name

    You can customize the display name of an instance in DMS. When you add a database to DMS for the first time, DMS synchronizes the instance name from the database. After that, the instance name is no longer synchronized. You can maintain the instance name by editing the instance. For more information, see Edit an instance.

    Enable DBLink

    DMS enables DBLink for instances by default. If you do not specify a custom DBLink name, DMS automatically generates one for you.

    Lock-free Schema Change

    Note

    This configuration option is available only when the database is MySQL, and allows you to select a change execution method when the instance is in Stable Change or Security Collaboration mode.

    The DMS lock-free execution method is enabled by default.

    DMS supports DMS Lock-Free Change Execution and Prioritize Native Lock-Free and Fall Back to DMS Execution, two methods for executing changes.

    Enable SSL

    Note

    This parameter appears only for MySQL or Redis databases.

    By default, SSL connection is disabled in DMS.

    If you need to connect to the database over SSL, manually enable the SSL connection in DMS and ensure that SSL is also enabled on the database side.

    Secure Sockets Layer (SSL) encrypts network connections at the transport layer to improve the security and integrity of communication data, but it increases the network connection response time.

    DBA

    Select a DBA role for subsequent operations such as permission requests, permission management, and ticket approvals.

    Query timeout (s)

    This security policy helps protect the database by interrupting queries in the SQL window that exceed the specified timeout.

    Export timeout (s)

    This security policy helps protect the database by interrupting export tasks that exceed the specified timeout.

  4. After configuring the parameters, click Test Connection in the lower-left corner.

    Note

    If the connection test fails, check the instance information based on the error message.

  5. When Connection successful is displayed, click Submit.

    The database has been successfully added to DMS. You can view and manage your database in the instance list on the left side of the DMS console.

Related operations

  • If you switch from the Security Hosting - Automatic access mode to another mode and then switch back, DMS resets the password for the automatically generated account.

  • If you need to access resources from another Alibaba Cloud account in DMS, or register your resources with the DMS of another Alibaba Cloud account, see Access or register resources across accounts.

  • After you register a database instance with DMS, you may need to perform the following operations:

  • Use the AddInstance API to register an instance.

FAQ

  • Q: I added the DMS IP addresses to the whitelist of my Azure SQL Database, but I still receive the following error message when adding the database instance in the DMS console: Cannot open server "[Server Name]" requested by the login. The login failed. How can I resolve this?

    A: When you configure a New Instance, enter database account@server name in the database account field and try to reconnect. For example, if the public address of the Azure instance is testservername.testdatabase.windows.net and the database account is testuser, you need to enter testuser@testservername in the database account field.

  • Q: If the database to be added is an Oracle database deployed as a RAC cluster, how do I enter the SID parameter?

    A: In the SID parameter field, enter /<Service Name>.

  • Q: Is the Flexible Management mode no longer available in DMS?

    A: Yes. When the Stable Change and Security Collaboration modes are not selected, the instance defaults to the Flexible Management mode.

  • Q: I added a Redis instance to DMS over the Internet, and now I can only see DB0 in DMS.

    A: For self-managed and third-party cloud Redis clusters, DMS currently displays only DB0 after they are registered.