问答详情
源自:2-1 单节点数据库的介绍

关于PXC集群首节点恢复的问题

我尝试使用docker搭建了一个3节点PXC集群

启动第一个节点,后面两个加入,完成之后测试了一下数据同步没有问题

然后关闭第一个启动的节点,再恢复无法加入集群

2018-11-25T04:27:40.930345Z 0 [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 .

2018-11-25T04:27:40.930352Z 0 [ERROR] WSREP: Provider/Node (gcomm://) failed to establish connection with cluster (reason: 7)

2018-11-25T04:27:40.930356Z 0 [ERROR] Aborting

尝试关闭第二个和第三个节点都没有问题,请问第一个节点如果故障如何恢复呢?

提问者:浅羽Coding 2018-11-25 12:33

个回答

  • 慕无忌2098352
    2021-07-29 16:11:35

    启动的方式有问题应该是。直接mysql start启动就可以了,不需要在引导

  • qq_纯粹_3
    2019-06-10 11:41:35

    指令中需要加入  -e CLUSTER_JOIN=其他的一个节点

    你的第一个是主节点的化  可以修改/var/lib/docker/volumes/v1/_data/gratxxx.bat文件中的最后一个参数 0改成1
    也可以直接启动