MySQL
Data Sync reads MySQL as a source: it backfills the tables you select, then streams every insert, update and delete from the server's binary log. There is no MySQL sink.
Overview
MySQL records every committed change in its binary log. Data Sync reads that log rather than polling your tables, so each change is seen once, in commit order, and nothing is written into your schema. The connector covers MySQL and MySQL-compatible servers.
By default Data Sync tracks its position in the log by GTID, MySQL's global transaction identifier. A GTID position survives a failover to a replica, which a binary-log file name and offset does not.
Before you connect
Do this on the server first. A connection can test green and still be unable to stream if the binary log is not set up for row-level capture.
- Turn on row-based binary logging. Binary logging must be enabled (it is by default in MySQL 8) with
binlog_format = ROW. Statement-based logging does not record the rows a change touched. - Log whole rows. Set
binlog_row_image = FULL. WithMINIMAL, an update records only the columns that changed. - Turn on GTIDs, or switch them off in Data Sync. The connection's GTID mode is on by default, which needs
gtid_mode = ONandenforce_gtid_consistency = ONon the server. If your server does not use GTIDs, set GTID mode tofalseon the connection. - Keep the log long enough. If Data Sync is stopped for longer than
binlog_expire_logs_seconds, the log it needs to resume from has been purged and the sync cannot pick up where it stopped. - Create a user for Data Sync that can read the tables and read the binary log.
Connection fields
Set once, on the connection, in step 2 of the add-a-connection wizard.
| Field | Default | Description | |
|---|---|---|---|
host | Required | — | Hostname or address of the MySQL server. |
port | Optional | 3306 | TCP port. |
database | Optional | — | The database (schema) to read from. |
gtid_mode | Optional | true | Track the log position by GTID. Set to false for servers without GTIDs. |
tls_mode | Optional | none | One of none, require, verify-ca, verify-full. Use verify-full whenever the connection crosses a network you do not control. |
reconnect_budget | Advanced | 15m | How long Data Sync keeps trying to re-establish a dropped connection before the run fails. |
max_reconnect_attempts | Advanced | — | A cap on reconnect attempts within that budget. |
Credentials
Step 3 asks for the user and password, both required. Store them as a Blunox-managed secret or as a reference to your own secret store; the connection keeps a reference, never the value. See Connections for how the two options differ.