How I can Syncronize a Database from SQL betwen 2 servers

I have an app and a website as Frontend that work on the same database … Lets say as Example Facebook app and facebook Website.

What I would like to do and I m already few days working on it , is :

  1. have server A where all the query from the apps IOS and Android are on it
  2. have server B where all the query form the website are on it
  3. find a way that the same database DATABASE1 can sync live at any interaction

Like that i will have full resource of the servers for each different job , APPS or Website

i Read about “Master Slave Replication in MySQL” but seems that can make only a copy from server A to B and server B if change any data is not sync with A , my need is That serve A and B can sync live with their data .

Honestly I have no idea what kind of setup can handle this best.

I’m open to any suggestions (alternative setups) and/or links to any tutorials to set this up successfully.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You want database clustering, not replication. Look into galera.