Configure Galera Cluster on Almalinux 9
Run the following command as root on all 3 nodes:
dnf -y install mariadb-server-galera
Configure the All Nodes
vi /etc/my.cnf.d/galera.cnf
Change the following line below
wsrep_on=1
wsrep_cluster_name=”Galera_Cluster”
wsrep_cluster_address=”gcomm://<All Nodes IP Address>”
wsrep_node_address=”10.0.0.31″ <Current Node IP Address>
Execute the following command on 1st Node:
galera_new_cluster
systemctl enable mariadb
mysql_secure_installation
Execute the following command on other nodes:
systemctl enable –now mariadb
Check the status of Galera:
execute command below:
mysql
(inside the mysql)
show status like ‘wsrep_%’;
Verify the Address