Updated on 2024-10-24 GMT+08:00

RDS for MySQL/MySQL Database Link Parameters

Table 1 lists the parameters for a link to a MySQL database.

Do not change the password or user when the job is running. If you do so, the password will not take effect immediately and the job will fail.

Table 1 MySQL database link parameters

Parameter

Description

Example Value

Name

Link name, which should be defined based on the data source type, so it is easier to remember what the link is for

mysql_link

Database Server

IP address or domain name of the database to connect

Click Select next to the text box and select a MySQL DB instance in the displayed dialog box.

192.168.0.1

Port

Port of the database to connect

3306

Database Name

Name of the database to connect

dbname

Username

Username used for accessing the database This account must have the permissions required to read and write data tables and metadata.

cdm

Password

Password of the user

-

Use Local API

(Optional) Whether to use the local API of the database for acceleration.

When you create a MySQL link, CDM automatically enables the local_infile system variable of the MySQL database to enable the LOAD DATA function, which accelerates data import to the MySQL database. If this parameter is enabled, the date type that does not meet the format requirements will be stored as 0000-00-00. For details, visit the official MySQL website.

If CDM fails to enable this function, contact the database administrator to enable the local_infile system variable. Alternatively, set Use Local API to No to disable API acceleration.

If data is imported to RDS for MySQL, the LOAD DATA function is disabled by default. In such a case, you need to modify the parameter group of the MySQL instance and set local_infile to ON to enable the LOAD DATA function.

NOTE:

If local_infile on RDS is uneditable, it is the default parameter group. You need to create a parameter group, modify its values, and apply it to the RDS for MySQL instance. For details, see the Relational Database Service User Guide.

Yes

Use Agent

The agent function will be unavailable soon and does not need to be configured.

-

Agent

The agent function will be unavailable soon and does not need to be configured.

-

local_infile Character Set

When using local_infile to import data to MySQL, you can configure the encoding format.

utf8

Driver Version

Select a driver version that adapts to the database type.

-

Fetch Size

(Optional) Displayed when you click Show Advanced Attributes.

Number of rows obtained by each request. Set this parameter based on the data source and the job's data size. If the value is either too large or too small, the job may run for a long time.

1000

Commit Size

(Optional) Displayed when you click Show Advanced Attributes.

Number of records submitted each time. Set this parameter based on the data destination and the job's data size. If the value is either too large or too small, the job may run for a long time.

-

SSL Encryption

(Optional) If you set this parameter to Yes, CDM can connect to the database (on-premises databases excluded) in SSL encryption mode.

Yes

Link Attributes

(Optional) Click Add to add the JDBC connector attributes of multiple specified data sources. For details, see the JDBC connector document of the corresponding database.

The following are some examples:
  • connectTimeout=600000 and socketTimeout=300000: When a large amount of data needs to be migrated or the entire table is retrieved using query statements, the migration fails due to connection timeout. In this case, you can customize the connection timeout interval (ms) and socket timeout interval (ms) to prevent failures caused by timeout.
  • tinyInt1isBit=false or mysql.bool.type.transform=false: By default, tinyInt1isBit is true, indicating that TINYINT(1) is processed as a bit, that is, Types.BOOLEAN, and 1 or 0 is read as true or false. As a result, the migration fails. In this case, you can set tinyInt1isBit to false to avoid migration failures.
  • useCursorFetch=false: By default, useCursorFetch is enabled, indicating that the JDBC connector communicates with relational databases using a binary protocol. Some third-party systems may have compatibility issues, causing migration time conversion errors. In this case, you can disable this function. Open-source MySQL databases support the useCursorFetch parameter, and you do not need to set this parameter.
  • allowPublicKeyRetrieval=true: By default, public key retrieval is disabled for MySQL databases. If TLS is unavailable and an RSA public key is used for encryption, connection to an MySQL database may fail. In this case, you can enable public key retrieval to avoid connection failures.

sslmode=require

Reference Sign

(Optional) Delimiter between the names of the referenced tables or columns. For details, see the product documentation of the corresponding database.

`

Batch Size

Number of rows written each time. It should be less than Commit Size. When the number of rows written reaches the value of Commit Size, the rows will be committed to the database.

100