How I can Syncronize a Database from SQL betwen 2 servers

Posted May 6, 2016 2.3k views
MySQLServer OptimizationDigitalOcean

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.

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.

Submit an Answer
1 answer

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

  • Thanks a lot you open to me a new world !!

    I have just a question cuz my droplet are on Ubuntu 14.4 with SQL …
    Reading on galera and finding some info around they are talking about
    to set up Galera Cluster with MariaDB ....
    Do i need to install also MariaDB or i can only use the galera Cluster ?

    Thanks a lot for you answer !!