7 min readJul 28, 2022
–
MySQL Server replication provides redundancy and allows the prevention of data loss. It also increases efficiency at the time of data access. Thus, knowing how to replicate your database is an important skill to have in your arsenal. Master-Slave replication is one of the most popular configurations of database replication. However, it is the MySQL Master Master replication that has proven to be advantageous by enabling read/write operations from multiple servers.
The examples in this article will be based on two VM’s, named Server A and Server B.
Server A: 192.168.1.1 Server B: 192.168.1.2
Step 1 — Install and Configure MySQL on Server A and Server B
The first thing we need to do is to install the mysql-server and mysql-client package…
7 min readJul 28, 2022
–
MySQL Server replication provides redundancy and allows the prevention of data loss. It also increases efficiency at the time of data access. Thus, knowing how to replicate your database is an important skill to have in your arsenal. Master-Slave replication is one of the most popular configurations of database replication. However, it is the MySQL Master Master replication that has proven to be advantageous by enabling read/write operations from multiple servers.
The examples in this article will be based on two VM’s, named Server A and Server B.
Server A: 192.168.1.1 Server B: 192.168.1.2
Step 1 — Install and Configure MySQL on Server A and Server B
The first thing we need to do is to install the mysql-server and mysql-client packages on our server. We can do that by typing the following:
yum install mysql-server mysql-client
Change SELINUX to permissive (if installed)
Server A : 192.168.1.1
vi /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=permissive# SELINUXTYPE= can take one of these…