PolarDB-X is compatible with several popular data synchronization and Change Data Capture (CDC) tools. This page lists the supported tools, the minimum PolarDB-X version required for each, and the permissions your database account needs to subscribe to binlogs.
Compatible tools
The following tools work with PolarDB-X binlogs. All tools require MySQL-compatible binlogs, which PolarDB-X supports from version 5.4.11.
| Tool | Minimum version | Notes |
|---|---|---|
| MySQL Slave | 5.4.11 | Global Transaction Identifier (GTID)-based replication is not supported. |
| canal | 5.4.11 | None |
| DTS | 5.4.11 | See Overview of data synchronization scenarios for supported scenarios. |
| debezium | 5.4.12 | Snapshot mode is not supported. Set snapshot.mode to never. |
| maxwell | 5.4.12 | None |
| mysql-binlog-connector-java | 5.4.11 | None |
Limitations
-
GTID-based replication: MySQL Slave does not support GTID-based replication with PolarDB-X.
-
debezium snapshots: Snapshot mode is not supported. If
snapshot.modeis not set tonever, debezium attempts a full snapshot on startup, which PolarDB-X does not support and causes the connector to fail. Always setsnapshot.mode: neverin your debezium connector configuration.
Required permissions
The permissions your account needs depend on your PolarDB-X version.
Privileged accounts have full permissions by default and can query and subscribe to binlogs without additional grants.
For non-privileged accounts, grant permissions based on your version:
PolarDB-X 5.4.11 and later
Grant the SELECT permission on all databases to query and subscribe to binlogs:
GRANT SELECT ON *.* TO 'user'@'host';
PolarDB-X 5.4.12 and later
Version 5.4.12 introduces granular binlog permissions. Grant only what each account needs:
| Permission | Grant statement | Enables |
|---|---|---|
| REPLICATION CLIENT | GRANT REPLICATION CLIENT ON *.* TO 'user'@'host'; |
Running SHOW MASTER STATUS and SHOW BINARY LOGS |
| REPLICATION SLAVE | GRANT REPLICATION SLAVE ON *.* TO 'user'@'host'; |
Running SHOW BINLOG EVENTS and subscribing to binlogs |
Use REPLICATION CLIENT and REPLICATION SLAVE instead of the broader SELECT grant to limit account access to binlog operations only.