mariadb galera启动问题

 

搭建了mariadb galera集群后,整个集群停掉后如何启动呢,我们要先启动那个节点呢,今天我尝试把集群机器全部停掉,然后任意启动一个节点,发现报如下的错误:

170620 21:32:55 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates. To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .

意思该节点不是最后一个离开集群的节点(最后停掉的节点),可能没有包含所有更新的数据,强制从该节点启动,需要手工编辑grastate.dat文件,设置safe_to_bootstrap=1,当然了,我们不需需要强制从该节点启动,我们逐一排查每个节点下的grastate.dat文件(该文件在data目录下),找到safe_to_bootstrap=1的节点,然后在该节点上启动即可.

比如我这里找到节点的是节点3
[root@hxl03 data]# more grastate.dat
# GALERA saved state
version: 2.1
uuid: 43caaa91-54bf-11e7-9321-c60bd8969b24
seqno: 2919
safe_to_bootstrap: 1

 

集群中第一台mariadb启动方法:

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

集群中其它数据启动方法:

/etc/init.d/mysql start

转载于:https://www.cnblogs.com/hanxing/p/7719696.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值