All Products
Search
Document Center

Register a user-built database in an on-premises data center by using a VPN gateway

Last Updated: Jun 02, 2020

Data Management Service (DMS) allows you to connect to a user-built database in an on-premises data center by using a Virtual Private Network (VPN) gateway and then register and manage the database as an instance in the DMS console.

Prerequisites

Background

VPN Gateway is an Internet-based service that securely and reliably connects enterprise data centers, office networks, or Internet-facing terminals to Alibaba Cloud VPCs through encrypted connections.

We recommend that you register your database by using a database gateway, which is more secure and convenient. Currently, the Database Gateway service is in public preview and is free of charge. For more information, see Register a user-built database in an on-premises data center by using a database gateway. Currently, DMS allows you to register the following types of VPC-connected databases as instances:

  • MySQL
  • SQL Server
  • PostgreSQL
  • Oracle
  • MongoDB
  • Redis

Procedure

  1. Log on to the DMS console.

  2. Move the pointer over the plus sign (+) in the upper-left corner and select Add instance.

    You can also open the Add instance dialog box in the following way:

    1. In the top navigation bar, choose System Management > Instance.
    2. On the Instance List tab of the Instance page, click New in the upper-left corner.
  3. In the Add instance dialog box that appears, click the VPC line IDC tab.

  4. In the VPC line IDC section, select a database type.

  5. In the dialog box that appears, set the parameters as required. The following table describes the parameters.Register a VPC-connected database 1

    Tab Parameter Description
    Basic Information Database Source The category of the data source. Set this parameter to VPC line IDC.
    Database type The type of the database to be registered.
    Instance Area The Alibaba Cloud region that is geographically close to the region where the target database is deployed.
    VPC ID The ID of the VPC that is connected to the on-premises data center. You must establish the connection before you register the database. For more information, see Establish a connection between a VPC and an on-premises data center.
    Login Address The endpoint that is used to connect to the database.
    Port The port that is used to connect to the database.
    Database account The username that you use to log on to the database.
    Database password The password that you use to log on to the database.
    Control Mode The control mode that is used to manage the instance in DMS. For more information, see Control modes.
    Advanced Information Environment type The type of environment where the database is deployed.
    Instance Name The name that you specify for the instance in DMS.
    Enable DSQL Specifies whether to enable the cross-database query feature for the database. For more information, see Cross-database query.
    OnlineDDL Specifies whether to allow changing schemas without locking tables for the database and the specific method. For more information, see Change schemas without locking tables.
    DBA The DBA of the instance who is allowed to grant permissions to users.
    query timeout(s) The timeout interval of the statement that is used to query data. When the specified time interval is reached, the target statement run in the SQL editor is stopped to protect the database security.
    export timeout(s) The timeout interval of the statement that is used to export statistics. When the specified time interval is reached, the target statement run in the SQL editor is stopped to protect the database security.
  6. On the Basic Information tab, click Test connection in the lower-left corner. Wait until the connectivity test is passed.

    If the test fails, check the parameter values that you specify.

  7. Click Submit. Now you have registered a database in your on-premises data center as an instance in DMS and the instance appears in the left-side navigation pane of the DMS console. You can view and manage the instance in the DMS console.