0

I have two separated locations connected by a not too reliable VPN. I have a common system that depends on MYSQL that read/write tables. Will master-master replication keep both locations in sync? I don't care that tables might not look exactly the same in time on both servers (for example, rows on both masters when VPN fails, might get a different order after both locations write transactions...)

Note: Not doing auto-increment / offset settings

  • Any PRIMARY or UNIQUE keys? Any chance of dup key? Any UPDATE t SET x=x+1 WHERE ...? (And many other caveats against writing to both Masters.) – Rick James Jun 12 '15 at 3:48
0

I have a third party app that is using a master-master MySQL system and if your network/communication is not good you may have some issue with your replication.

Types of errors you may encounter is 1062 (duplicate key).

Right now to avoid this error we put it in the slave_skip_errors in themy.cnf file.

Also if your network/communication is not good is not good, your instances may keep and failing back and forth.

It can work but you will need a lot of fine tuning and monitoring.

| improve this answer | |
  • I do not recommend slave_skip_errors -- you could be sweeping legitimate application bugs under the rug. – Rick James Jun 12 '15 at 19:23
  • I agree , instead I would skip the error after checking it out – Philippe Courtois Jun 13 '15 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.