All Products
Search
Document Center

Quick BI:Add a user-created MySQL data source

Last Updated:Sep 27, 2023

You can add a MySQL data source to connect the MySQL database to Quick BI. After the connection is successful, data can be analyzed and displayed in the Quick BI console. Quick BI can be connected to a MySQL data source over the Internet or an internal network. This topic describes how to add a user-created MySQL data source.

Prerequisites

  • If you Quick BI connect to the MySQL database over the Internet, add the Quick BI IP address to the whitelist of the database. For more information, see Add security group rules.

  • If you want to connect Quick BI to the MySQL database over an internal network, make sure that one of the following methods is used to ensure the connectivity between Quick BI and the user-created MySQL data source:

    • If the MySQL database is deployed on an Elastic Compute Service (ECS) instance, you can connect Quick BI to the MySQL data source over a virtual private cloud (VPC).

    • You can deploy a jump server and access the database over an SSH tunnel.

  • A user-created MySQL database is created. The username and password that are used to access the user-created MySQL database are obtained.

    Note

    Quick BI is compatible with MySQL 5.7 or earlier and MySQL 8.0.

  • The authentication AccessKey ID and AccessKey Secret are obtained. For more information, see Obtain an AccessKey.

Step 1: Enable the firewall

You can connect to a MySQL database over the Internet only after the firewall is enabled.

  1. Run the following command to open the configuration file of the firewall:

    vi /etc/sysconfig/iptables
  2. Add the following command to the configuration file:

    -A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 3306 -j ACCEPT
  3. Run the following command to restart Iptable:

    service iptables restart

Step 2: Add a user-created MySQL data source

  1. After you log on to the Quick BI console.

  2. Perform the steps that are shown in the following figure to add a user-created MySQL data source.

    1. Go to the Create Data Source page.

    2. Select MySQL Data Source.

      image
    3. Select User-created Data Source Type. image

  3. In the Add MySQL Data Sources dialog box, configure the parameters.

    Component

    Description

    Display Name

    The display name of the data source configuration list.

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

    Database Address

    The address where the MySQL database is deployed, including the IP address or URL.

    Port

    The corresponding port number of 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

    Select VPC Data Source and configure the following parameters only if the MySQL database is deployed in a ECS and is deployed in a VPC:

    • AccessKey ID and AccessKey Secret: the AccessKey pair that is used to purchase the instance.

      For more information, see Obtain an AccessKey pair.

    • Instance ID: the ID of the ECS instance.

    • Region: the region in which the ECS instance is deployed.

    SSL

    If SSL is configured for the data source that you want to access, you can also select SSL to protect data security.

    SSH

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

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

    • SSH Host: 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 Number: the port number that is used to connect to the jump server. Default value: 22.

    For more information, see Connect to a Linux instance by using a password.

    Note

    Only the Professional Edition allows you to access user-created data sources by using SSH tunnels.

    Enable the file upload portal

    You can upload files after you turn on the switch.

  • Click Test Connection to verify that the data source can be connected.

    image
  • Click OK.

What to do next

After you add a data source, you can create a dataset and analyze data.