New to the replication. I am configuring multi-master replication. I did the following steps:
- made one slave.
- configured two masters to it.
Now i am performing following scenario:
disconnect both masters from this slave. (TEST_TABLE having the last row with P_ID 30)
After discoonecting, add an entry (into TEST_TABLE) on both MASTERS. (primary key entry with auto_incremeent went to 31)
reconnect slave to master-1 (It replicate the data with P_ID 31 on it)
reconnect slave to master-2 (Here comes the Duplicate Entry ERROR)
I am unable to figure out what the purpose of replication is if i have to face this issue? or am i missing something too basic?
I have done this with both Row Based Replication as well as Statement Based Replication but same error. So what's the point of SBR? Only to log statement rather than row data? Or if it's replicating the statement, why issuing the same P_ID and not just running the command generally and auto_incrementing the id to 32.
Reference query can be:
**INSERT INTO TEST_TABLE ('firstname','lastname') VALUES('f_name_entry','l_name_entry')**
If really i am getting all this wrong and this is the exact behavior replication do, then whats the solution to it?
Banging my head for whole week on this. Kindly ask if anything is missing and Sorry if i am unable to explain something. Thanks in advance to bear me.