Report this

What is the reason for this report?

I have 3 Database Servers (MYSQL) that I want to know how to synchronize at a time. For centos8.

Posted on December 6, 2021

I have 3 Database Servers (MYSQL) that I want to know how to synchronize at a time. For centos8. Adding, subtracting, deleting, or changing something in the database is like changing 3 databases at the same time.



This textbox defaults to using Markdown to format your 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.

Hi @tusherghosh2015,

You can plan on implementing MySQL Replication. If database servers should carry the same data and should be synced.

For reference on replication : https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-howto.html https://www.digitalocean.com/community/tutorials/how-to-set-up-replication-in-mysql

Regards, Rajkishore

Hi @tusherghosh2015,

I think what you are looking at is a Master/Slave configuration. You have one master and two slave databases. All databases are on every Droplet. When you change the information on your Master, it will automatically change the databases on your Slave Droplet’s as well.

DigitalOcean have a pretty good tutorial on how to setup replication. You can check it out here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-replication-in-mysql

https://www.digitalocean.com/community/tutorials/how-to-set-up-mysql-master-master-replication

This setup is a very popular one. It’s used in production environments all the time. When working with databases, it can be useful to have multiple copies of your data. This provides redundancy in case one of the database servers fails and can improve a database’s availability, scalability, and overall performance. The practice of synchronizing data across multiple separate databases is called replication.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.