Quick BI supports self-managed MySQL data sources. If your business data is stored in a MySQL database, you must add a MySQL data source to Quick BI before you use Quick BI to process data. This topic describes how to add a self-managed MySQL data source.

Prerequisites

  • If you use the Internet to connect Quick BI to your MySQL database, make sure that the CIDR blocks of Quick BI are added to the whitelist of the MySQL database. For more information, see Add security group rules.

    The CIDR blocks of Quick BI are 10.152.69.0/24, 10.152.163.0/24, and 139.224.4.0/24.

  • If you use an internal network to connect Quick BI to the MySQL database, make sure that one of the following methods is used to ensure the connectivity between Quick BI and the self-managed MySQL data source:
    • If the MySQL database is deployed on an Elastic Compute Service (ECS) instance, you can use a virtual private cloud (VPC) to connect to the data source.
    • You can deploy a jump server and connect to the database over an SSH tunnel.
  • The username and password that are used to log on to the MySQL database are obtained.
    Note Quick BI is compatible with MySQL 5.7 or earlier and MySQL 8.0.
  • The AccessKey ID and AccessKey secret that are used for authentication are obtained. For more information, see Obtain an AccessKey pair.

Limits

Only workspace administrators and organization administrators can add data sources.

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 self-managed MySQL data source

  1. Choose Workspace > Data Sources.
  2. In the upper-right corner of the Data Sources page, click Create Data Source.
  3. In the Add Data Source dialog box, click the User-created Data Sources tab. Then, click the MySQL card.
    1
  4. In the Add MySQL Database dialog box, configure the parameters.
    • If you use the Internet to connect Quick BI to the MySQL database, configure the following parameters.
      Parameter Description
      Name The name of the data source. The name appears in the list of data sources.

      The name can contain letters, digits, underscores (_), and hyphens (-).

      Database Address The public IP address of the server on which the database is deployed.
      Port Number The port number that is used to connect to the database over the Internet. Default value: 3306.
      Database The custom name of the database. The name is specified when you create the database. For example, enter mysql.
      Username The username that is used to log on to the database.
      Password The password that is used to log on to the database.
      Database version The version of the database. Valid values:
      • Select 5.7. This specifies that Quick BI is compatible with MySQL 5.7 and earlier.
      • Select 8.0. This specifies that Quick BI is compatible with MySQL 8.0.
    • If you use an internal network to connect Quick BI to the MySQL database, select User-created ECS Data Source (VPC) and configure the following parameters.
      Parameter Description
      Name The name of the data source. The name appears in the list of data sources.

      The name can contain letters, digits, underscores (_), and hyphens (-).

      Database Address The private endpoint of the Elastic Compute Service (ECS) instance on which the database is deployed.
      Port Number The port number that is used to connect to the database over the internal network.
      Database The custom name of the database. The name is specified when you create the database. For example, enter MySQL.
      Username The username that is used to log on to the database.
      Password The password that is used to log on to the database.
      User-created ECS Data Source (VPC) Select User-created ECS Data Source (VPC) only when the database is deployed on an ECS instance and the data source is connected to Quick BI over a VPC. After you select User-created ECS Data Source (VPC), configure the following parameters:
      • AccessKey ID: the AccessKey ID that you used to purchase the instance on which the database is deployed.

        For more information, see Obtain an AccessKey pair.

      • AccessKey Secret: the AccessKey secret that you 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.
    To use an SSH tunnel to connect to a self-managed data source, select ssh and configure the following parameters.
    Parameter Description
    ssh If you select ssh, 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: the username that is used to log on to the jump server.
    • SSH Password: the password that is 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 Quick BI Enterprise Standard allows you to connect to self-managed data sources in group workspaces over SSH tunnels.
  5. Click Test Connection to verify that the data source can be connected.
    Test connectivity with the database
  6. Click OK.

What to do next

After you add a data source, you can create a dataset and analyze data.
  • You can add data tables in the self-managed MySQL data source or user-defined SQL statements for ad hoc analysis to Quick BI. For more information, see Create a dataset.
  • For more information about how to add visual charts and analyze data, see Create a dashboard and Overview.
  • For more information about how to mine data value and deeply analyze data, see Configure the drilling feature.