我无法在centos 7中配置galera集群。 在这里,我按照https://mariadb.com/resources/blog/getting-started-with-mariadb-galera-and-mariadb-maxscale-on-centos/的建议进行了以下操作。 这是我的操作系统详细信息:[root @ localhost my.cnf.d]#cat / etc / redhat-release CentOS Linux版本7.4.1708(核心) 如链接中所述,对server.cnf文件进行以下更改。 发出galera_new_cluster命令后,仍然可以看到群集尚未启动。 让我惊讶的是,我发现server.cnf文件中的任何更改都不会影响maria db,如果如果我写出juck data,仍然在发出galera_new_cluster之后,maria db starts,状态看起来像 ariaDB [(none)]>显示类似'wsrep%'的全局状态; </ p>
+--------------------------+----------------------+
| Variable_name | Value |
+--------------------------+----------------------+
| wsrep_cluster_conf_id | 18446744073709551615 |
| wsrep_cluster_size | 0 |
| wsrep_cluster_state_uuid | |
| wsrep_cluster_status | Disconnected |
| wsrep_connected | OFF |
| wsrep_local_bf_aborts | 0 |
| wsrep_local_index | 18446744073709551615 |
| wsrep_provider_name | |
| wsrep_provider_vendor | |
| wsrep_provider_version | |
| wsrep_ready | OFF |
| wsrep_thread_count | 0 |
+--------------------------+----------------------+
答案 0 :(得分:0)
检查文件/etc/my.cnf 应该是这样的:
#
# This group is read both both by the client and the server
# use it for options that affect everything
# [client-server]
#
# include all files from the config directory
includedir /etc/my.cnf.d
答案 1 :(得分:0)
这是重新安装后才发现未引用/etc/my.cnf.d/的对我有用的方法,而是在my.cnf中添加了galera配置,并且有效 样本my.cnf:
#
[galera]
binlog_format=row
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://172.16.1.2,172.16.1.3” # include all of the master node ips
## Galera Cluster Configuration
wsrep_cluster_name=“test_cluster”
## Galera Synchronization Configuration
wsrep_sst_method=rsync
## Galera Node Configuration
wsrep_node_address=“172.16.1.3”
wsrep_node_name=“node-0”
#