Migration from MySQL Galera Cluster to MariaDB Galera Cluster using Replication
A strategy for migrating from a MySQL Galera Cluster to a MariaDB Galera Cluster by setting up the new cluster as an asynchronous replica, minimizing downtime.
Prerequisites
Migration Steps
2
Install and Configure a New MariaDB Galera Cluster
[mysqld]
# MariaDB settings
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so # Adjust path if necessary
# Galera Cluster Configuration
wsrep_cluster_name="new_mariadb_cluster"
wsrep_cluster_address="gcomm://node1_ip,node2_ip,node3_ip"
# Node-specific Configuration
wsrep_node_name="mariadb_node1"
wsrep_node_address="node1_ip"
# SST Configuration
wsrep_sst_method=mariadb-backup
3
4
5
Set Up Asynchronous Replication
CREATE USER 'repl_user'@'mariadb_node_ip' IDENTIFIED BY 'your_password';
GRANT REPLICATION SLAVE ON *.* TO 'repl_user'@'mariadb_node_ip';CHANGE MASTER TO
MASTER_HOST='mysql_source_ip',
MASTER_PORT=3306,
MASTER_USER='repl_user',
MASTER_PASSWORD='your_password',
MASTER_USE_GTID=slave_pos;
START SLAVE;PreviousMigrating to MariaDB from MySQLNextMigration from MySQL to MariaDB Cluster (Node-by-Node In-Place)
Last updated
Was this helpful?

