Installed Galera cluster on an ubuntu 20.04 server, using these instructions:
https://galeracluster.com/2021/03/installing-galera-4-with-mysql-8-on-ubuntu-20-04/
But after installation, when I run "mysql -uroot -p -e "show status like 'wsrep_cluster_size'" " I always get:
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 0 |
So the cluster does not start.
sudo aa-status gives nothing for mysql, as I disabled apparmor for mysql using these:
How to disable AppArmor for MySQL
/etc/mysql/mysql.conf.d/mysqld.cnf is like this:
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=192.168.1.2
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
# #
# # # Galera Cluster Configuration
wsrep_cluster_name=flog
wsrep_cluster_address=gcomm://192.168.1.2,192.168.1.3,192.168.1.4
# #
# # Galera Synchronization Configuration
wsrep_sst_method=rsync
# #
# # Galera Node Configuration
wsrep_node_address=192.168.1.2
## This is first node