报错一:

2018-06-28T07:32:12.527956Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach p
rimary view: 110 (Connection timed out)
at gcomm/src/pc.cpp:connect():158
2018-06-28T07:32:12.527974Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backen
d connection: -110 (Connection timed out)
2018-06-28T07:32:12.528057Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1513: Failed to open channel 'sjbpxc
' at 'gcomm://192.168.1.210:6600,192.168.1.210:6602': -110 (Connection timed out)
2018-06-28T07:32:12.528072Z 0 [ERROR] WSREP: gcs connect failed: Connection timed out
2018-06-28T07:32:12.528081Z 0 [ERROR] WSREP: Provider/Node (gcomm://192.168.1.210:6600,192.168.1.210:6602) f
ailed to establish connection with cluster (reason: 7)
2018-06-28T07:32:12.528086Z 0 [ERROR] Aborting

解决:

pxc节点加入集群,集群的地址不对或者pxc节点通信的端口不对
Failed to open channel 'pxc' at 'gcomm://192.168.1.210:6600,192.168.1.210:6602': -110 (Connection timed out)
提示我无法加入pxc这个集群,查看my.cnf配置文件更改wsrep_cluster_address='gcomm://192.168.1.210:6630,192.168.1.210:6632'
这个集群的地址要填pxc节点相互通信的地址,不能填mysql的服务地址,默认的地址是监听的地址是4567

报错二:

如何解决Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
先要卸载Linux自带的mysql,删除相关的文件

rpm-qa | grep mysql (注意大小写,如果mysql不行就换MySQL)
yum -y remove mysql的包名
卸载后/var/lib/mysql中的数据及/etc/my.cnf不会删除,如果确定没用后就手工删除

rm -f /etc/my.cnf
rm -rf /var/lib/mysql
安装Xtrabackup

rpm -ivh percona-xtrabackup-24-2.4.3-1.el7.x86_64.rpm
可能会出现下面错误提示信息:

Failed dependencies:
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.3-1.el7.x86_64
perl(DBD::mysql) is needed by percona-xtrabackup-24-2.4.3-1.el7.x86_64

(1)解决 perl(DBD::mysql) :

yum install -y perl-DBD-MySQL
(2)解决 libev.so.4()(64bit)
可以自行去rpmfind.net搜索系统所需要的rpm包进行下载安装

wget ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/libev-4.15-1.el6.rf.x86_64.rpm
OK,安装完成
使用Xtrabackup备份

innobackupex --user=root --password=Pengyuanzhi --socket=/var/lib/mysql/mysql.sock /root
(1)Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693.
.pm实际上是Perl的包,只需安装如下软件包即可:

yum -y install perl-Digest-MD5

报错三:

[ERROR] Can't start server: Bind on TCP/IP port: Address already in use
[ERROR] Do you already have another mysqld server running on port: 3306 ?

解决:

查看3306端口是否被占用,查看my.cnf配置文件中
wsrep_sst_receive_address=192.168.1.210:6622
wsrep_provider_options = "gmcast.listen_addr=tcp://192.168.1.210:6632;ist.recv_addr=192.168.1.210:6633;"
都不能和mysql服务端口冲突