MySQL Bidirectional Synchronization
To meet user needs for multi-regional and even cross-cloud disaster recovery, UDTS has launched MySQL-MySQL bidirectional synchronization functionality.
Currently, bidirectional synchronization is similar to the incremental synchronization mode, and does not deal with complete data transfer, which is suitable for scenarios where the initial data of two databases is consistent.
Create a Bidirectional Synchronization Task
Select the “Bidirectional Synchronization” task type.
Fill in the information for the two databases (currently the scenario where both databases are external is not supported).
Precautions
-
Both databases are required to enable binlog, with the format set to ROW and MODE set to FULL.
-
Tables within the databases must have a primary key.
-
Databases need to have GTID mode enabled, though it’s optional. If not filled, synchronization will start from the current position.
-
If auto-increment primary keys are used in the two tables for bidirectional synchronization, corresponding auto-increment step values should be set on both sides. For example, use odd IDs on one side and even IDs on the other, ensuring no duplicate ID data is created when records are created, or use UUID/snowflake to ensure ID uniqueness between the two tables.
-
Users cannot simultaneously update the same data in both databases.
-
The current version of bidirectional synchronization only supports MySQL 5.6/5.7, and the source and target database versions must be consistent.