标签:oba AC hce not 宕机 comm trap bootstrap err
宕机节点以单机集群启动,既自己作为一个集群启动,不过UUID要和旧的集群保持一致:
[root@pxc_node0_172.16.11.127 ~]# mysqlbinlog -vv /data/database/pxc3306/pxc-3306-bin.00000* | grep -A5 "Xid = 737"
# 180420 20:17:16 server id 127 end_log_pos 2221492 Xid = 737 # 就是这个
COMMIT/*!*/;
# at 105205941
# 180424 14:41:01 server id 127 end_log_pos 105206002 GTID last_committed=44702 sequence_number=44710 rbr_only=yes
[root@pxc_node0_172.16.11.127 ~]# mysqlbinlog -vv /data/database/pxc3306/pxc-3306-bin.00000* --start-datetime="2018-04-24 14:41:01" > binlog.sql
wsrep_cluster_address=gcomm://30.0.0.227,30.0.0.226,30.0.0.225
safe_to_bootstrap: 1
[root@pxc_node2_172.16.11.137 ~]#/usr/bin/mysqld_safe --defaults-file=/etc/pxc3306.cnf --wsrep-cluster-address="gcomm://" &
这时候是非主模式:
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
(root@localhost) [(none)]> SET GLOBAL wsrep_provider_options=‘pc.bootstrap=true‘;
(root@localhost) [(none)]> source /data/backup/sql ;
[root@pxc_node2_172.16.11.137 ~]# vim /data/database/pxc3306/grastate.dat
# GALERA saved state
version: 2.1
uuid: bf26341f-43cb-11e8-a863-62c0eb4d9e79
seqno: 737
safe_to_bootstrap: 0
wsrep_cluster_address=gcomm://30.0.0.227,30.0.0.226,30.0.0.225
或者指定一个donor
--wsrep_sst_donor=xxx
标签:oba AC hce not 宕机 comm trap bootstrap err
原文地址:https://www.cnblogs.com/wshenjin/p/8962349.html