Bidirectional Synchronization
To meet user requirements for multi-regional and even cross-cloud disaster recovery, UDTS has introduced the function of MySQL-MySQL bidirectional synchronization.
The current bidirectional synchronization is equivalent to the incremental synchronization mode and does not handle full data transfer. It is suitable for situations where the initial data of the two databases are consistent.
Create Bidirectional Synchronization Task
Select Bidirectional Synchronization
task type
Fill in the information for both databases (Currently, the scenario where both databases are external databases is not supported)
Precautions
-
Dual databases need to enable binlog, the
binlog_format
is ROW,binlog_row_image
is FULL. -
All tables in the database must have a primary key.
-
The database needs to enable GTID mode, but it is not mandatory. If not filled in, synchronization will start from the current position.
-
If the two tables in bidirectional synchronization are primary key auto-increment, you need to set corresponding auto-increment step values on both sides, such as one side using odd ID, and the other side using even ID, so that when data records are created, there will not be data with the same ID, or use UUID/snowflake to ensure that the IDs of the two tables will not be duplicated.
-
Users cannot update the same data in the dual databases at the same time.
-
The current bidirectional synchronization version only supports MySQL5.6/5.7, and requires the source database and target database versions to be consistent.