Question

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

Posted December 6, 2021 122 views
Databases

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.

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
2 answers

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

by Mark Drake
MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database. This can helpful for many reasons including facilating a backup for the data,a way to analyze it without using the main database, or simply as a means to scale out. This tutorial will cover a very simple example of mysql replication—one master will send information to a single slave.

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.

by Mark Drake
MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database. This can helpful for many reasons including facilating a backup for the data,a way to analyze it without using the main database, or simply as a means to scale out. This tutorial will cover a very simple example of mysql replication—one master will send information to a single slave.