我是靠谱客的博主 开心悟空,这篇文章主要介绍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导致无法启动的,下次大家遇到同样的问题修改即可。

最后

以上就是开心悟空最近收集整理的关于mysql pxc启动_Percona XtraDB Cluster(PXC) 无法正常启动的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(111)

评论列表共有 0 条评论

立即
投稿
返回
顶部