mysql pxc启动_Percona XtraDB Cluster(PXC) 无法正常启动

今天重启pxc全部服务器的时候无法启动查看日志的报错如下:

2018-02-03 09:05:50 3913 [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文件,第一次的修改不知道在哪只能运行find命令去找,从根目录找:

cd /

find . -name 'grastate.dat'

结果文件在/var/lib/mysql/grastate.dat目录下你拷贝这个即可

然后执行vi 命令:

vi /var/lib/mysql/grastate.dat

修改safe_to_bootstrap 值 当前文件为0 改为1

结构如下:

# GALERA saved state

version: 2.1

uuid: 002bd039-c2c8-11e7-82c7-36d79987c3c9

seqno: -1

safe_to_bootstrap: 1

然后执行命令/etc/init.d/mysql bootstrap-pxc 就可以启动

但是当启动完成后

safe_to_bootstrap 会改为0 我猜测可能是某些不正常情况下重启的时候safe_to_bootstrap没有从0改为1导致无法启动的,下次大家遇到同样的问题修改即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值