Updated on 2024-11-07 GMT+08:00

Creating a Data Source

Scenarios

You can perform unified data source management. Currently, this function is used only for SQL audit.

Prerequisites

The data source to be created must be connected successfully.

Procedure

  1. Log in to the UGO console.
  2. In the navigation pane, choose Data Source Management.
  3. Click Create Data Source in the upper right corner.
  4. Configure parameters as needed.

    After the basic information is configured, the Test button next to Test Connection is available.
    Figure 1 Creating a data source
    Table 1 Parameter description

    Parameter

    Description

    Name

    Name displayed in the data source management list.

    The name must contain 5 to 50 characters, start with a letter, and end with a digit or letter. Only letters (case-insensitive), digits, underscores (_), and hyphens (-) are allowed.

    DB Type

    Type of the source database to be configured. Only GaussDB and MySQL are supported.

    Network Type

    Public Network: An EIP is used to connect to a database.

    If the database has an IP address whitelist, add the EIP to the whitelist to ensure that UGO can connect to the database.

    Connection Method

    Only the server name can be used for connection.

    DB Name

    Name of a database to be managed.

    Enter a string of 2 to 128 characters, including letters, digits, periods (.), underscores (_), hyphens (-), dollar signs ($), and number signs (#). The value must start with a letter, digit, period (.), underscore (_), or hyphen (-) and can contain quotation marks (").

    Host Type

    Only the host IP address can be used.

    Host IP Address

    Host IP address, which can be an IPv4 or IPv6 address

    NOTE:

    When DB Type is set to MySQL, IPv6 address can be used.

    Host Port

    Port of the database to be managed

    Username

    Username of the database to be managed.

    The value is a string of 2 to 128 characters, including letters, digits, underscores (_), hyphens (-), dollar signs ($), and number signs (#). It must start with a letter, digit, period (.), underscore (_), or hyphen (-) and can be enclosed in double quotation marks.

    Password

    Password of the database to be managed.

    The password can contain up to 50 characters.

  5. Click Test. If the test is successful, Connected is displayed, and the Create button in the lower right corner is available.

    If the test failed dut to network faults or insufficient permissions, an error is displayed. You cannot create a data source.

  6. Click Create. A message is displayed, indicating that the project is created.
  7. Click OK to go to the Data Source Management page. View the data source you created in the list.

    You can search for a data source by data source ID, data source name, database name, database type, IP address, or port.
    Figure 2 Viewing a data source