forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › 2-Way Sync Behavior With Sja
January 7, 2013 at 2:27 pm #12898
have setup 2-way sync between 2 MySQL servers where S1 is the Source and S2 is the Target. The sync appears to work somewhat: The INSERT statements propagate both directions regardless whether created on S1 or S2. UPDATE statements are a problem! If the UPDATE was initiated on S2 (target), they will be reset back to S1 state (even if that record on S1 wasn't touched). That is not 2-way in my book.
+ S1 and 2 start with: MyTable; Record R1 with myStatus column data 'test'.
+ Update the myStatus of R1 to 'Changed' on S2.
+ 2-way sync.
+ Result both S1 and S2 are back to original state where the myStatus is 'test'
I would expect this from 1 way sync with overwrite but not from 2-way.
< ?xml version="1.0" encoding="UTF-8"?>
Server1 MyUser ***** 3306 0 0 0 rev_CUST Server2 MyUser ***** 3306 1 0 0 rev_CUST `MyTable` e:trctrace.trc.txt MyName email@example.com firstname.lastname@example.org email@example.com my.smtp no 25 SYNC Error yyyy-mm-dd hh:mm:ss
January 7, 2013 at 3:27 pm #34094
What is the idea in creating 2 Forums post and 1 ticket? One contact option is enough!
I have replied in your ticket
January 2, 2014 at 9:27 pm #34095
was this resolved? i would like to do a 2-way sync myself.
January 8, 2014 at 11:47 am #34096
You can do a two-way sync. But it works like this: first a one-way sync in one direction (source>target) and next a one-way sync in the other direction. If you insert data in both between sync jobs you will have do define the Primary Key in such a way that the same PK-value is not created on both.
There are dozens of similar replies explaining (and also more elaborate) the importance of understanding how Data Sync works with the Primary Keys of tables..
You must be logged in to reply to this topic.