Hey everyone I would like to ask if this case is possible, I wanted to setup a replication of master to master from my localhost to my VPN (DigitalOcean) MySQL. As I’m using C# application for my localhost and PHP application to my Remote host, and I wanted both Server (Local and VPN) data to sync each other. So whatever transaction (Insert, Edit, Delete) are done in localhost, are also available in my VPN and vice versa.

if Possible my Question:

1.) What OS do i need to install in my Localhost? as Im using Xampp for MySQL and windows 10 for my OS, in my localhost and Centos 7.xx.x in my VPN and MariaDB.

2.) What database would I used for this case MariaDB (MySQL) or PostgreSQL?.

I really appreciate someone who could give me some guide or links for the tutorial.

Thanks A lot

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

Once you have the networking piece out of the way and your local computer can connect to your droplet and your droplet can connect to your local server this is fairly straightforward to set up.

This guide will walk you through master-master replication setup on MySQL or MariaDB.

PostgreSQL also supports replication settings if it is a better fit for your uses.

by Jason Kurtz
This second installment of "Scaling Web Applications" will list out the steps necessary for scaling a mysql deployment over two VPS.