Search code examples
mysqllinuxmariadbgalera

I can't activate mariadb cluster node


I was installing and configuring the first mariadb 1.0.33 cluster node in fedora 27 from scratch. I did the following steps:

  1. $setenforce 0
  2. $yum -y install MariaDB-Galera-server MariaDB-client rsync galera

  3. $mysql -u root

    MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'cluster1-user'@'%' IDENTIFIED BY 'cluster1-user' WITH GRANT OPTION;
    MariaDB [(none)]> FLUSH PRIVILEGES;
    MariaDB [(none)]> exit;
    
  4. $service mysql stop

  5. $vim /etc/my.cnf.d/server.cnf

    [mariadb-10.0]
    query_cache_size=0
    binlog_format=ROW
    default_storage_engine=innodb
    innodb_autoinc_lock_mode=2
    wsrep_provider=/usr/lib64/galera/libgalera_smm.so
    wsrep_cluster_address="gcomm://192.168.56.104"
    wsrep_cluster_name='cluster1'
    wsrep_node_address='192.168.56.104'
    wsrep_node_name='galera-db01'
    wsrep_sst_method=rsync
    
  6. $service mysql bootstrap //mariadb starts with success

  7. $mysql -u root -p -e "show status like 'wsrep%'"

Even though the output is

Variable              Value
---------------------------------
wsrep_cluster_size     0
wsrep_cluster_status   disconected
wsrep_connected        OFF
wsrep_provider_name    
wsrep_ready            ON
wsrep_thread_count      0

My question is why it shows me disconected, cluster size=0. What is missing?

Regards


Solution

  • On Fedora 27 the default MariaDB version is 10.2.9 at the moment. So cluster settings under a mariadb-10.0 section in server.cnf won't be read, which would explain lack of cluster success.