【问题标题】:Maria DB cluster setting issue in centos 7centos 7中的Mariadb集群设置问题
【发布时间】:2019-07-21 05:42:06
【问题描述】:

我在 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 数据,仍然在发出 galera_new_cluster 之后,maria db started 并且状态看起来像 ariaDB [(none)]> 显示全局状态,如 'wsrep%' ;

+--------------------------+----------------------+
| 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                    |
+--------------------------+----------------------+

【问题讨论】:

  • 这是我的 galera 更改设置
  • [galera] # 强制设置 wsrep_on=ON wsrep_provider=/usr/lib64/galera/libgalera_smm.so wsrep_cluster_address=gcomm://192.168.56.114,192.168.56.113,192.168.56.112 binlog_format=row default_storage =InnoDB innodb_autoinc_lock_mode=2
  • 看起来 maridb 守护进程没有指向 /etc/my.cnf.d/server.cnf 。我重新安装了几次并清理了所有文件夹,但同样发生了

标签: mariadb


【解决方案1】:

检查你的文件 /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

【讨论】:

    【解决方案2】:

    这对我来说是重新安装后发现 /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”
     #
     
    

    【讨论】:

      猜你喜欢
      • 2014-07-30
      • 2014-04-15
      • 1970-01-01
      • 2018-03-23
      • 2019-01-07
      • 1970-01-01
      • 2021-05-20
      • 1970-01-01
      • 2014-12-15
      相关资源
      最近更新 更多