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

MySQL

The MySQL connector allows you to connect applications with the MySQL database, and manage data transmission.

  • MySQL is a popular, open-source relational database widely used as the backend of web applications. It supports multiple operating systems, such as Windows, Linux, Unix, and macOS X. MySQL features high performance, reliability, and flexibility, and is popular among enterprises and developers.
  • The default MySQL port number is 3306. The administrator can change the port number as required. MySQL supports multiple storage engines, including InnoDB, MyISAM, and MEMORY. Each storage engine has its own pros and cons and can be configured flexibly.

Creating a MySQL Connection

  1. Log in to the new ROMA Connect console.
  2. In the navigation pane on the left, choose Connector. On the page displayed, click New Connection.
  3. Select the MySQL connector.
  4. In the dialog box displayed, configure the connector and click OK.

    Parameter

    Description

    Name

    Enter the connector instance name.

    Region

    Select a region.

    Project

    Select a project.

    Instance

    Select an instance for subsequent connectivity verification.

    Connection and Security

    Select the connection mode for the database. Currently, the Default mode is supported.

    IP Address

    Enter the IP address of the database.

    Port

    Enter the port number to which the database is connected.

    Database Name

    Enter the name of the database to be connected.

    Username

    Enter the username used to connect to the database.

    Password

    Enter the password used to connect to the database.

    Description

    Enter the description of the connector to identify it.

Action

  • Obtaining records
  • Obtaining incremental records
  • Adding records
  • Updating records
  • Replicating records
  • Deleting records
  • Custom SQL

Configuring Parameters

Table 1 Obtaining records

Parameter

Description

Table Name

Enter the name of the data table to be queried.

Field Name

Enter the fields to be queried. Separate multiple fields with commas (,).

WHERE Condition

Enter the conditions for the queried data.

Order By Field

Enter the sorting field of the returned result.

Limits

Enter the number of records on each page in the returned result.

Offset

Enter the offset of the pagination query.

Table 2 Obtaining incremental records

Parameter

Description

Table Name

Enter the name of the data table to be queried.

Field Name

Enter the fields to be queried. Separate multiple fields with commas (,).

WHERE Condition

Enter the conditions for the queried data.

Order By Field

Enter the sorting field of the returned result.

Start Timezone for incremental database selection

Start time zone for obtaining incremental data.

Incremental Selection Timestamp Field Name

Timestamp field for obtaining incremental data.

Incremental Selection Timestamp Initial Value

Initial timestamp for obtaining incremental data.

Reset Initial Incremental Selection Time

Whether to enable the reset of the initial time for obtaining incremental data.

Incremental Selection Compensation Period (ms)

Time compensation for obtaining incremental data.

Table 3 Adding records

Parameter

Description

Table Name

Enter the name of the table where data will be inserted.

Data to Insert

Enter the value of the target field in the insert operation.

Table 4 Updating records

Parameter

Description

Table Name

Enter the name of the table where data will be updated.

Data to Update

Enter the value of the target field in the update operation.

WHERE Condition

Enter the conditions for the data to be updated.

Table 5 Replicating records

Parameter

Description

Table Name

Enter the name of the data table to be replicated.

Clear Table

Whether to clear the table each time data is replicated.

Table 6 Deleting records

Parameter

Description

Table Name

Enter the name of the table where data will be deleted.

WHERE Condition

Specifies the conditions for the data to be deleted.

Table 7 Custom SQL

Parameter

Description

Statement

Enter the native SQL statement for operating the database.

  • Statements display all your inputs as plain text. Do not include sensitive information.
  • Be careful when using non-query statements such as drop and truncate.