All Products
Search
Document Center

Quick BI:Add a user-created MySQL data source

Last Updated:Jan 20, 2025

You can add a MySQL data source to Quick BI to enable data analysis and visualization within the Quick BI console. This service supports connections via the Internet or an internal network. This topic describes the steps to add a user-created MySQL data source to Quick BI.

Limits

Supports MySQL versions 5.5, 5.6, 5.7, and 8.0.

Prerequisites

  • To connect Quick BI to a MySQL database over the Internet, add Quick BI's IP address to the database's whitelist. For more information, see Add a Security Group Rule.

  • To connect Quick BI to a MySQL database over an internal network, ensure connectivity using one of the following methods:

    • If the MySQL database is hosted on an ECS instance, Quick BI can connect via a VPC.

    • Alternatively, deploy a jump server and establish an SSH tunnel for database access.

  • Ensure you have created a user-created MySQL database and have the necessary username and password to access it.

  • Obtain the authenticated AccessKey ID and AccessKey Secret. For more information, see Obtain an AccessKey.

Step 1: Enable the Firewall

Ensure the firewall is enabled before attempting to connect to a MySQL database over the Internet.

  1. Open the firewall configuration file with the following command:

    vi /etc/sysconfig/iptables
  2. Insert the following command into the configuration file:

    -A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 3306 -j ACCEPT
  3. Restart Iptables with the following command after successful configuration:

    service iptables restart

Step 2: Add a User-created MySQL Data Source

  1. Log on to the Quick BI console.

  2. Follow the steps illustrated below to add a data source:

    1. Navigate to the data source creation page via the data source creation entry.

    2. Select the MySQL data source option.

      image

    3. Choose the user-created data source type.image

  3. In the Add MySQL Data Source dialog box, configure the following settings according to your business needs:

    Name

    Description

    Display Name

    The display name in the data source configuration list.

    The name cannot contain special characters or start or end with spaces.

    Database Address

    The address of the MySQL database, including the IP address or domain name.

    Port

    The port number corresponding to the database address.

    Database

    The name of the database that is customized when you deploy the database.

    Username and Password

    The username and password that are used to access the MySQL database.

    VPC Data Source

    If the MySQL database is deployed on an ECS instance and uses the Alibaba Cloud VPC network, select VPC Data Source and configure the following parameters:

    • Purchaser Accessid and Purchaser Accesskey: The AccessKey ID and AccessKey Secret of the purchaser of the instance.

      For more information, see Obtain an AccessKey.

      Note

      Ensure that the account has Read permissions on the destination instance. If the account has Write permissions, the system automatically adds the whitelist. Otherwise, you must manually add it. For more information, see Create a custom policy.

    • Instance ID: The instance ID of the ECS instance. Log on to the ECS console and obtain the instance ID on the Instances tab.

      For more information, see View instance information.

    • Region: The region where the ECS instance resides. Log on to the ECS console and obtain the region in the upper-left corner of the page.

      For more information, see View instance information.

    SSL

    If the destination data source is configured with SSL, you can select the security protocol SSL to protect data security.

    SSH

    If you select SSH, you must configure the following parameters:

    You can deploy a jump server and access the database over an SSH tunnel. To obtain the jump server information, contact O&M personnel or system administrators.

    • SSH Host: Enter the IP address of the jump server.

    • SSH Username and SSH Password: The username and password that are used to log on to the jump server.

    • SSH Port: The port of the jump server. Default value: 22.

    For more information, see Log on to a Linux instance by using password authentication.

    Init SQL

    After this feature is enabled, you can configure SQL statements that are executed to initialize the data source connection.

    Only SET statements are allowed. Use semicolons to separate multiple statements.

    Enable file upload entry

    After this feature is enabled, file uploads are supported.

  • Click Connection Test to verify the data source connectivity.

    image

  • Once the test is successful, click OK to finalize the data source addition.

What to Do next

Once the data source is established, you can proceed to create datasets and analyze data.