Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.55 minutes in January 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Galera cluster asynchronous replication – How we do it?

by | Feb 18, 2021

Wondering how to do Galera cluster asynchronous replication? We can help you.

Galera can be used in database replication for frequently copying data from one node to another node.

We do database replication to provide high scalability and availability of the database.

At Bobcares, we often get requests to set up database replication, as a part of our Server Management Services.

Today, let’s see how our Support Engineers set up this.

Galera cluster asynchronous replication for MySQL

Now let’s see how our Support Engineers do MySQL replication with the Galera cluster.

Initially, we will deploy the clusters as required. Here let’s take the instance where we use 6 nodes.

That is 3 for primary and 3 for the disaster recovery site.

Then we take one node and setup an asynchronous replication link.

The parameters inside my.cnf will be seen as given below:

server_id=40 # this number must be different on every node.
log_bin = /var/lib/mysql-binlog/binlog
log_slave_updates = ON
gtid_mode = ON
enforce_gtid_consistency = true
expire_logs_days = 7

Then we will create a replication user and point the slave to master to replicate the slave.

We can do this using the following commands:

mysql> GRANT REPLICATION SLAVE ON *.* to slave@'%' IDENTIFIED BY 'slavepassword';
mysql> CHANGE MASTER TO MASTER_HOST = 'galera3-primary', MASTER_USER = 'slave', MASTER_PASSWORD = 'slavepassword' , MASTER_AUTO_POSITION=1;

Next, we need to set up alternative master nodes in one cluster in case of failure. That is, if the master node in cluster 1 fails then another node in the same cluster must be available for the client.

In addition, we will also consider the situation where the cluster itself fails. In this case, if the primary cluster is not available for the client then the second one will be available.

[Still, having trouble in replicating your Galera cluster? – We can help you.]


In short, we saw how to do Galera cluster asynchronous replication for MySQL. Also, we saw the steps our Support Engineers follow to do this.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *