Report this

What is the reason for this report?

Fail to test Galera Cluster with MySQL 5.6 on CentOS 7.2

Posted on February 22, 2022

I’m testing the Galera cluster.

The environment is Centos 7.2. DB is MySQL 5.6.

The success message was confirmed using the following instructions.

/etc/init.d/mysql start --wsrep-new-cluster

Starting MySQL… SUCCESS!

But if you check the cluster size, it says 0.

mysql -uroot -p -e “SHOW STATUS LIKE ‘wsrep_cluster_size’”

Enter password: ±-------------------±------+ | Variable_name | Value | ±-------------------±------+ | wsrep_cluster_size | 0 | ±-------------------±------+

The cnf file of the initial node I set is as follows.

/etc/my.cnf.d/galera.cnf


[mysqld] 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/lib64/galera-3/libgalera_smm.so

Galera Cluster Configuration

wsrep_cluster_name=“test_cluster” wsrep_cluster_address=“gcomm://”

Galera Synchronization Configuration

wsrep_sst_method=rsync

Galera Node Configuration

wsrep_node_address=“my node_1 ip” wsrep_node_name=“galera1”


I turned off both firewall and selinux.

Please tell me the solution.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi @

It’s hard to troubleshoot it like that, quick searches have showed me similar issues which have been resolved like:

  • Check if /etc/mysql/my.cnf is missing the line !includedir /etc/mysql/mysql.conf.d/
  • Make sure both servers have the exact same version of MySQL.

Hello,

For MySQL and CentOS 7, I could suggest following the steps from this tutorial here:

https://bobbyiliev.com/blog/galera-cluster-mariadb-10-1-on-centos-7-server

However, as a side note, keep in mind that both MySQL 5.6 and CentOS 7 are both EOL, meaning that they are no longer officially supported and no security updates will be released. So if you are setting this up for a production system, I would advise going for a tech stack that is still supported.

For example, you could set up a Galera Cluster with MariaDB on Ubuntu 20.04 Server as described here:

https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-on-ubuntu-18-04-servers

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.