Help Center/ DataArts Studio/ FAQs/ DataArts Migration/ What Should I Do If a JDBC Connection Timeout Error Is Reported During MySQL Migration?
Updated on 2024-04-29 GMT+08:00

What Should I Do If a JDBC Connection Timeout Error Is Reported During MySQL Migration?

Symptom

The following error message is displayed during MySQL migration: "Unable to connect to the database server. Cause: connect timed out."

Possible Cause

The table has a large data volume, and the source end uses the where statement to filter data. However, the column is not an index column or the column values are not discrete. As a result, the entire table is scanned during the query, causing a JDBC connection timeout. The c_date field is not an index column, as shown in Figure 1.

Figure 1 Non-index column

Solution

  1. Contact the DBA to modify the table structure, set the columns to be filtered as index columns, and try again.

    If the failure persists because the data is not discrete, perform 2 to 4 and increase the JDBC timeout duration.

  2. Locate the MySQL link name based on the job and obtain the link information.
    Figure 2 Link information
  3. Click the Links tab and click Edit to edit the link.
    Figure 3 Editing the link
  4. Click Show Advanced Attributes, add parameters connectTimeout and socketTimeout and their values in Link Attributes , and click Save.
    Figure 4 Editing advanced attributes