Skip to main content

Overview

The OLake MySQL Source connector supports multiple sync modes. It also offers features like parallel chunking, checkpointing, and automatic resume for failed full loads. This connector can be used within the OLake UI or run locally via Docker for open-source workflows.

Sync Modes Supported​

  • Full Refresh
  • Full Refresh + CDC
  • CDC Only
  • Full Refresh + Incremental

Connection Prerequisites​

Version Prerequisites​

MySQL Version: MySQL 5.7+

CDC Prerequisite​

Connection Prerequisites​

  • Read access to the tables for the MySQL user.

After initial Prerequisites are fulfilled, the configurations for MySQL can be configured.


Configuration​

1. Navigate to the Source Configuration Page​

  1. Complete the OLake UI Setup Guide
  2. After logging in to the OLake UI, select the Sources tab from the left sidebar.
  3. Click Create Source on the top right corner.
  4. Select MySQL from the connector dropdown
  5. Provide a name for this source.

2. Provide Configuration Details​

  • Enter MySQL credentials.

    Source tab
FieldDescriptionExample Value
MySQL Host requiredList of database host addresses to connect to.mysql-host
Username requiredUsername for authenticating with the database.mysql-user
Password requiredPassword for the database user.mysqlpwd
DatabaseName of the target database to use.mysql-db
Port requiredPort number on which the database server is listening.3306
Update Method
  • Standalone : If only Full refresh and Incremental will be used.
  • CDC : If CDC related modes will be used.
CDC
Initial Wait TimeMaximum duration in seconds to wait before considering the binlog syncer idle.0
Skip TLS VerificationIndicates whether to skip TLS certificate verification.false
Max ThreadsMaximum number of parallel threads for processing or syncing data.3
Backoff Retry CountNumber of retry attempts for establishing sync with exponential backoff.3

3. Test Connection​

  • Once the connection is validated, the MySQL source is created. Jobs can then be configured using this source.

  • In case of connection failure, refer to the Troubleshooting section.


Data Type Mapping​

MySQL Data TypesDestination Data Type
int, int unsigned, mediumint, mediumint unsigned, smallint, smallint unsigned, tinyint, tinyint unsignedint
bigint, bigint unsignedbigint
float, decimal(10,2)float
double, double precision, realdouble
datetime, timestamptimestamptz
char, varchar, text, tinytext, mediumtext, longtext, enum, json, bit(1), timestring
timestamptz timezone

OLake always ingests timestamp data in UTC format, independent of the source timezone.


Troubleshooting​

1. Failed to Get Current Binlog Position​

Cause: Binary logging not enabled, wrong format, or insufficient privileges.
Fix:

  • Ensure binary logging is enabled:
SHOW VARIABLES LIKE 'log_bin'; // Should return `ON`
  • Ensure row-based logging:
SHOW VARIABLES LIKE 'binlog_format'; // Should return `ROW`.
  • Grant required privileges:
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'your_user'@'%';

2. Idle Timeout Reached, Exiting Binlog Syncer​

  • Cause: No new changes within the configured initial_wait_time.
  • Fix: Increase initial_wait_time in the connector configuration or verify data changes in the source database.

3. Column Count Mismatch: Expected X, Got Y​

  • Cause: Table schema changed after CDC started or incomplete binlog metadata.
  • Fix:
    • Ensure full binlog metadata:
    SHOW VARIABLES LIKE 'binlog_row_metadata';
    Should return FULL. To set it:
    SET GLOBAL binlog_row_metadata = 'FULL';
    Update my.cnf or my.ini for persistence.
    • Restart the connector after schema changes.

4. Failed to Get or Split Chunks​

  • Cause: Table stats not populated or table contains 0 records.

  • Fix: Run the following query to populate table statistics:

    ANALYZE TABLE <namespace>.<table_name>;

If the issue is not listed here, post the query on Slack to get it resolved within a few hours.

Changelog​

Date of ReleaseVersionDescription
27 August 20250.1.11override default timeout in Discover


πŸ’‘ Join the OLake Community!

Got questions, ideas, or just want to connect with other data engineers?
πŸ‘‰ Join our Slack Community to get real-time support, share feedback, and shape the future of OLake together. πŸš€

Your success with OLake is our priority. Don’t hesitate to contact us if you need any help or further clarification!