This topic describes how to add a RDS for MySQL data source in DataV.

Prerequisites

The RDS for MySQL data source is ready to be added.

Procedure for adding a data source over an internal network

  1. Log on to the DataV console.
  2. On the My Data tab, click Data Sources and click Add Data.
  3. Select RDS for MySQL from the Type drop-down list.
  4. Select Intranet from the network type drop-down list, and select the region where the target ApsaraDB RDS for PostgreSQL instance resides from the region drop-down list.
    Select Intranet
  5. Specify a network type for the internal network of the database, such as VPC or classic network.
    • VPC
      1. Turn on VPC to enter the VPC mode. Data source parameters in VPC mode
      2. Enter database information.
        Note If you need to create a database, see Create a database for an ApsaraDB RDS for MySQL instance.
        ParameterDescription
        NameThe name of the data source. Enter a custom name.
        VPC IDThe ID of the VPC where your RDS for MySQL instance resides. You can log on to the ApsaraDB for RDS console and navigate to Instances > Basic Information to view the VPC ID of the target ApsaraDB RDS for PostgreSQL instance in the Network Type column. Obtain VPC ID
        Instance IDThe ID of the database instance in the VPC. You can log on to the ApsaraDB for RDS console and view the ID of the target database instance on the Instances page.
        Note Generally, you can view the VPC ID of a database instance in the console of a database product. However, due to the VPC network implementation mechanism, sometimes the instance ID displayed in the console is not the instance ID required to configure the VPC network for the DataV data source. Therefore, you must call the API operation of a database service to obtain the ID of the VPC that is required by DataV. In most cases, the ID is VPCCloudInstanceId or VPCInstanceId in the details of the database instance. To obtain the ID of the VPC that is required by a database service, you can call the DescribeDBInstanceAttribute operation to obtain the ID of the VPC.
        DomainThe domain name or IP address that is used to connect to the database.
        Important The endpoint is the domain name or IP address that the DataV server can use to access your database over the Internet or an internal network in some Alibaba Cloud regions.

        For example, if you use ApsaraDB for RDS for MySQL over an internal network, the domain name is rm-bpxxxxxxxxx33150.mysql.rds.aliyuncs.com, which can be obtained on the Basic Information page of the RDS console.

        Port NumberThe port set for the database. Default value: 3306.
        User NameThe username that is used to connect to the database.
        PasswordThe password that is used to connect to the database.
        DatabaseThe name of the database. Select the desired database.
        insecureAuthIf your MySQL version is earlier, you need to turn on the switch before you can configure MySQL.
      3. After you enter the database information, DataV automatically tests whether the database can be connected.
        Important If an error message Access VPC instance fail appears when you test the connection to the database, you can add the -1 suffix to the instance ID and try to test the connection to the database again.
    • Classic Network
      1. Turn off VPC to enter the classic network mode.
      2. Enter database information. Add an ApsaraDB RDS for MySQL data source over a classic network (internal network)
        Note If you need to create a database, see Create a database for an ApsaraDB RDS for MySQL instance.
        ParameterDescription
        NameThe name of the data source. Enter a custom name.
        DomainThe domain name or IP address that is used to connect to the database.
        Important The endpoint is the domain name or IP address that the DataV server can use to access your database over the Internet or an internal network in some Alibaba Cloud regions.

        For example, if you use ApsaraDB for RDS for MySQL over an internal network, the domain name is rm-bpxxxxxxxxx33150.mysql.rds.aliyuncs.com, which can be obtained on the Basic Information page of the RDS console.

        Port NumberThe port set for the database. Default value: 3306.
        User NameThe username that is used to connect to the database.
        PasswordThe password that is used to connect to the database.
        DatabaseThe name of the database. Select the desired database.
        insecureAuthIf your MySQL version is earlier, you need to turn on the switch before you can configure MySQL.
      3. After you enter the database information, DataV automatically tests whether the database can be connected.
        Important If an error message Access VPC instance fail appears when you test the connection to the database, you can add the -1 suffix to the instance ID and try to test the connection to the database again.
  6. After the database passes the connectivity test, click OK.

    The added data source is displayed in the data source list.

Procedure for adding a data source over the Internet

  1. Log on to the DataV console.
  2. On the My Data tab, click Data Sources and click Add Data.
  3. Select RDS for MySQL from the Type drop-down list.
  4. Select Internet from the network type drop-down list.
  5. Enter database information.
    Add an ApsaraDB RDS for MySQL data source (Internet)
    ParameterDescription
    NameThe name of the data source. Enter a custom name.
    DomainThe domain name or IP address that is used to connect to the database.
    Important The endpoint is the domain name or IP address that the DataV server can use to access your database over the Internet or an internal network in some Alibaba Cloud regions.

    For example, if you use ApsaraDB for RDS for MySQL over the Internet, the domain name is rm-bpxxxxxxxxxco.mysql.rds.aliyuncs.com. You can obtain the domain name on the Basic Information page in the ApsaraDB RDS console.

    Port NumberThe port that is used to connect to the database.
    User NameThe username that is used to connect to the database.
    PasswordThe password that is used to connect to the database.
    DatabaseThe name of the database. Select the desired database.
    insecureAuthIf your MySQL version is earlier, you need to turn on the switch before you can configure MySQL.
    After you enter the database information, DataV automatically tests whether the database can be connected.
    Important If an error message Access VPC instance fail appears when you test the connection to the database, you can add the -1 suffix to the instance ID and try to test the connection to the database again.
  6. After the database passes the connectivity test, click OK.

    The added data source is displayed in the data source list.