All Products
Search
Document Center

Access other user-created database instances

Last Updated: Jun 02, 2020

This topic describes how to access other user-created databases from DAS (formerly HDM), such as user-created databases in local IDCs, of other cloud vendors, and on virtual machines of other cloud vendors.

Types of database engines

DAS can access the following types of user-created databases:

  • MySQL
  • MongoDB
  • Redis
  • PostgreSQL

Access methods

DAS can access other user-created databases in the following methods:

  • Direct access: No DAS gateway (DBGateway) is deployed. DAS actively accesses databases over the Internet. You can quickly access database instances after entering accounts and passwords. This method can only be used to access MySQL, MongoDB, and Redis databases.

  • Centralized-mode access: DAS gateways are deployed on at least one server (we recommend that you use two of more servers for disaster recovery scenarios) and database instances are automatically discovered.

  • Host-mode access: DAS gateways are deployed on every server and database instances are automatically discovered. In this method, all DAS features are available, such as full SQL analysis, SQL response time, and security auditing. For more information, see Features for three access methods.

    Access methods

Features for three access methods

Feature Direct access Centralized-mode access Host-mode access (recommended)
Database monitoring metrics Supported Supported Supported
Real-time performance Supported Supported Supported
Real-time session Supported Supported Supported
Storage analysis Supported Supported Supported
Slow query request analysis Supported Supported Supported
Host monitoring metrics Not supported Not supported Supported
Request diagnosis Not supported Not supported Supported
Full request analysis Not supported Not supported Supported
Request response time Not supported Not supported Supported
Security audit Not supported Not supported Supported

Direct access

  1. Log on to the DAS console.

  2. In the Recommended Features section of the Overview page, click Access Instance.

  3. Click Other User-created or Cloud Databases.

  4. Click Direct Access.

  5. Configure the following parameters.

    Parameter Description
    Select Region The region where the database resides.
    Select Engine The type of the database.
    Database Account The account used to log on to the database.
    Password The password used to log on to the database.
    Instances Enter instances in the format of “endpoint:port”.
  6. Click Test Connection.

  7. If Status is Verified, click Save Instance.

    If Verified is not displayed, modify the parameters and then click Test Connection.

  8. If you want add another database, click Add More.

Centralized-mode access

  1. Log on to the DAS console.

  2. In the Recommended Features section of the Overview page, click Access Instance.

  3. Click Other User-created or Cloud Databases.

  4. Click DBGateway in Centralized Mode.

  5. Select an access method.

    Note: If you have not deployed a DAS gateway in the corresponding VPC, click New deployment DAS Gateway (dbgateway) and scanning instance.If you have deployed a DAS gateway in the corresponding VPC, click Use existing DAS DBGateway to scan for new instances.

    • Deployed a new DAS gateway
    1. Click New deployment DAS Gateway (dbgateway) and scanning instance.

    2. Select a network type and then click Generate Deployment Command.

      • Network Type is based on the connection method between the host where DBGateway is deployed and Alibaba Cloud. Example:
        1. For a user-created database connected over the Internet, select Public Network (Classic Network).
        2. If you are connecting to databases in local IDCs or other clouds through a dedicated line or VPN, select Proprietary Network (VPC/Leased Line).
      • Network Domain is used to manage different environments such as user-created databases in local IDCs or on other clouds.
    3. Copy the deployment command. Log on to the corresponding device and run the command.HDM_user_manual_18

      If successful is returned in the command line window, the DAS gateway is deployed and will be automatically discovered by DAS.
      If the deployment is not successful, you can submit a ticket at .

    4. If Current Status is Normal, click Next.

    • Use an existing DAS gateway
      1. Click Use existing DAS DBGateway to scan for new instances.
      2. In the Select DBGateway step, select the target DAS gateway and then click Discover Instance.
  6. In the Discover Instance step, scan and discover the target database instance.

    1. DAS can discover instances in the following ways:

      • Select Automatic Scan:
        1. Enter the scanned CIDR block in the Scanned Address field.
        2. Enter the port range in the Port Range field.
        3. Click Scan.
      • Select Enter Instances:
        1. Enter instances in the correct form in the Instances field.
        2. Click Scan.

          The DAS gateway will automatically scan and discover the target database instance.

    2. Click Next.

  7. Configure the following parameters.

    Parameter Description
    Select Engine The type of the database.
    Database Account The account used to log on to the database.
    Password The password used to log on to the database.
    IP Address The IP address of the database.
    • If the database has an existing account with required permissions, you can enter the account and password and then click Authorize.
    • If the database does not have an existing account with required permissions, you can enter the database account and password and then click Generate Authorization Command. After you copy and run the authorization command on the target database, click Authorize.
  8. Click Authorize.

    After you click Authorize, Accessed is displayed to indicate successful connection. The following common errors also may be displayed:

    • Unauthorized: No account or password is specified.
    • Connection Failed: indicates errors such as network failure or instance downtime.
    • Authentication Failed: indicates incorrect username or password.
  9. Click Complete.

Host-mode access

  1. Log on to the DAS console.

  2. In the Recommended Features section of the Overview page, click Access Instance.

  3. Click Other User-created or Cloud Databases.

  4. Click DBGateway in Host Mode.

  5. Select a network type and then click Generate Deployment Command.

    • Network Type is based on the connection method between the host where DBGateway is deployed and Alibaba Cloud. Example:
      1. For a user-created database connected over the Internet, select Public Network (Classic Network).
      2. If you are connecting to databases in local IDCs or other clouds through a dedicated line or VPN, select Proprietary Network (VPC/Leased Line).
    • Network Domain is used to manage different environments such as user-created databases in local IDCs or on other clouds.
  6. Copy the deployment command. Log on to the corresponding device and run the command.

    HDM_user_manual_18

    If successful is returned in the command line window, the DAS gateway is deployed and will be automatically discovered by DAS.If Current Status is Normal, click Next.If the deployment is not successful, you can submit a ticket at .

  7. Configure the following parameters.

    Parameter Description
    Select Engine The type of the database.
    Database Account The account used to log on to the database.
    Password The password used to log on to the database.
    IP Address The IP address of the database.

    If the database has an existing account with required permissions, you can enter the account and password and then click Authorize.If the database does not have an existing account with required permissions, you can enter the database account and password and then click Generate Authorization Command. After you copy and run the authorization command on the target database, click Authorize.

  8. Click Authorize.

    After you click Authorize, Accessed is displayed to indicate successful connection. The following common errors also may be displayed:

    • Unauthorized: No account or password is specified.
    • Connection Failed: indicates errors such as network failure or instance downtime.
    • Authentication Failed: indicates incorrect username or password.
  9. Click Complete.