Manage database connections

更新时间:
复制 MD 格式

Save database connections in Data Transmission Service (DTS) and reuse them across tasks. When configuring a task, select a saved connection to auto-populate the database details.

Prerequisites

To add a database from another Alibaba Cloud account, grant RAM permissions to the account that accesses the DTS console. Configure RAM authorization for cross-account tasks.

Limits

  • Available only in the new DTS console. Not supported in the old DTS console or the Data Management (DMS) console.

  • Saved connections apply only to task configuration in the DTS console.

  • After a connection is added, your Alibaba Cloud account and any RAM users with DTS permissions can view and use it.

  • A connection with Type of Source applies only to the Source Database section. A connection with Type of Destination applies only to the Destination Database section.

  • The Instance Name must be unique.

  • DTS does not validate Database Account or Database Password credentials.

  • When editing a connection, you cannot change the Instance Region or the Type.

Procedure

Create a connection

Note

This section uses an ApsaraDB RDS for MySQL instance as an example.

  1. Go to the Database Connections page.

  2. Click Create Instance.

  3. In the dialog box, configure the connection details.

    Parameter

    Description

    Type

    Select Source or Destination.

    Instance Name

    Use a descriptive name for easy identification.

    Database Type

    Select MySQL.

    Access Method

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region of the database instance.

    Replicate Data Across Alibaba Cloud Accounts

    Select No or Yes. In this example, No is selected.

    Note

    If you select Yes, you must also specify the Alibaba Cloud Account and RAM Role Name.

    RDS Instance ID

    Select the ID of the ApsaraDB RDS for MySQL instance.

    Database Account

    Enter the database account for the ApsaraDB RDS for MySQL instance.

    Database Password

    Enter the password for the specified database account.

    Encryption

    Select Non-encrypted or SSL-encrypted as needed. If you set this to SSL-encrypted, you must enable SSL encryption for the RDS for MySQL instance beforehand. For more information, see Use a cloud certificate to quickly enable SSL link encryption.

  4. Click OK.

Save a connection

You can also save a connection from the task configuration page.

  1. Navigate to the task configuration page.

    Note

    This example uses a data synchronization task.

    1. Go to the Data Synchronization Tasks page.

    2. Optional: In the upper-left corner, select the region of the data synchronization instance.

    3. Click Create Task.

  2. Configure the source or destination database.

  3. In the upper-right corner of the section, click the Save image icon.

  4. Enter a name for the connection in the Instance Connection Information Name field.

    Note

    Use a descriptive name for easy identification.

  5. Click OK.

Edit a connection

  1. Go to the Database Connections page.

  2. For the connection to edit, click Edit in the Actions column.

  3. In the Edit dialog box, update the connection details.

  4. Click OK.

Delete a connection

  1. Go to the Database Connections page.

  2. For the connection to delete, click Delete in the Actions column.

  3. In the confirmation message, click OK.

FAQ

  • How do I use a saved database connection?

    When configuring a task, select a Database Type in the Source Database or Destination Database section. Then choose the saved connection from the Select Existing Connection dropdown.

  • Why can't I find my saved database connection?

    The connection may have been deleted from the Database Connections page, or the Type of the saved connection (Source or Destination) does not match the section where you select it (Select Existing Connection).

  • How do I add a database instance in Data Management (DMS)?

    Register a cloud database instance or Register a database hosted on a third-party cloud service or a self-managed database.

    Note
    • DMS does not support specifying whether an instance is a source or destination.

    • Instances added in DMS cannot be used in the DTS console.

  • Will deleting a connection from the Database Connections page also delete the database?

    No. Deleting a connection from the Database Connections page only removes the record from DTS. The actual database and its data are not affected.