我有 3 节点 PXC 5.5 集群。my.cnf [mysqld] 部分中 node03 的设置:
wsrep_cluster_address=gcomm://<ip_node1>,<ip_node2>
wsrep_cluster_name=cluster
wsrep_provider_options="gcache.size=128M"
wsrep_node_address=<ip_node3>
wsrep_node_name=node03
wsrep_slave_threads=16
wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sst:XXXXXXXXXXXXXX
其他 2 个节点上的设置相同。node03 无法加入集群:
160807 5:30:18 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '<ip_node3>' --auth 'XXXXXXXXXXXXXX' --datadir '/var/lib/mysql/data/' --defaults-file '/etc/mysql/my.cnf' --parent '9532': 2 (No such file or directory)
捐助者节点 error.log 中的错误:
160807 5:13:30 [ERROR] WSREP: Command did not run: wsrep_sst_xtrabackup-v2 --role 'donor' --address '<ip_node3>:4444/xt
rabackup_sst' --auth '(null)' --socket '/var/run/mysqld/mysqld.sock' --datadir '/var/lib/mysql/data/' --defaults-file '/et
c/mysql/my.cnf' --gtid 'f964a515-38a3-11e6-8d63-47f60c48dba5:38453358'
捐助者节点 /var/lib/mysql/data/innobackup.backup.log 中的错误:
160807 05:24:35 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
160807 05:24:35 Connecting to MySQL server host: localhost, user: mysql, password: not set, port: 3306, socket: /var/run/mysqld/mysqld.sock
Failed to connect to MySQL server: Access denied for user 'mysql'@'localhost' (using password: NO).
--auth '(null)'
并Access denied for user 'mysql'@'localhost'
表示wsrep_sst_auth
未设置。
但如您所见,它存在于 my.cnf 中。我在本地主机上的施主节点上检查了 sst:XXXXXXXXXXXXXX,它可以工作。
为什么加入节点不使用wsrep_sst_auth
配置?