This topic describes how to connect an on-premises database or a database that is hosted on a third-party cloud to Alibaba Cloud by using Database Gateway. When you migrate, synchronize, or subscribe to data by using Data Transmission Service (DTS), you can select the database that is connected to Alibaba Cloud through Database Gateway as the source or destination database.
You can connect an on-premises database or a database that is hosted on a third-party cloud to Alibaba Cloud by using one of the following methods:
- Connect over Express Connect, VPN Gateway, or Smart Access Gateway: This method is not suitable for individual users because it requires high costs.
- Connect to the service port of the database over the Internet: This method incurs potential security risks.
- Forward service requests by using a user-created proxy: This method requires high costs and provides low stability.
In addition to the preceding methods, you can use Database Gateway to connect an on-premises database or a database that is hosted on a third-party cloud to Alibaba Cloud at a lower cost. For more information about the design concept of Database Gateway, see How it works.
Database Gateway is in public preview and is available only in the following regions: China (Hangzhou), Singapore (Singapore), Indonesia (Jakarta), UK (London), and US (Virginia).
Database Gateway incurs no fees in public preview.
- Log on to the Database Gateway console.
Note If you are using Database Gateway for the first time, the Enable Service page appears. On this page, read and agree to the Database Gateway Service Agreement, and then click Enable Now.
- Click Create Gateway.
- In the Create Gateway dialog box, enter the name and description of the database gateway, and then click Next step.
- Download the gateway program.
Notice The server that is used to deploy the gateway program must meet the following requirements:
- Performance: At least one CPU core and 1 GB memory are available. You can use higher-performance devices.
- Software environment: JRE 1.7 or later is installed. We recommend that you use a 64-bit operating system.
- The server can connect to the target database. If the server and the database are deployed in the same internal network, the network latency is minimal.
- The server can access the Internet. The service port of the server does not need to be accessible over the Internet. To ensure the channel rate and stability, the outbound bandwidth must be at least 10 Mbit/s.
- In the Create Gateway dialog box, download the gateway program for the target operating system based on the runtime environment.
- Copy the downloaded installation file to the server where you want to deploy the gateway program, and decompress the file.
- Start the gateway program.
- Log on to the server where the gateway program is deployed, and go to the directory where the gateway program is decompressed.
- Select one of the following methods to start the gateway program based on your operating system:
- For Linux or Mac, run the
- For Windows, double-click the db_agent.bat file in the bin directory.
- For Linux or Mac, run the
- Enter the AccessKey ID and AccessKey secret.
- After the verification is successful, return to the Database Gateway console and click Next step to obtain a random verification code.
- Enter the verification code in the CLI of the gateway program and press the Enter key. Wait until the connection is established.
- Add a database.
Note You can repeat this step to add multiple databases.
- Return to the Database Gateway console and click Add database.
- In the dialog box that appears, specify the database address, service port number, and description, and then click OK.