有人有在 Galera Cluster 和独立 MySQL slave 之间设置复制的经验吗?
我在 Galera Cluster 中有一个三个节点,我想设置 gtid 复制到 MySQL 从站。问题是所有 Galera 节点都编写了自己的 bin 日志,并且似乎导致了重复查询。结果,我得到了这样的无限错误:
Cannot add or update a child row: a foreign key constraint fails ..., Error_code: 1452; handler error HA_ERR_NO_REFERENCED_ROW; the event's master log mysql-bin.000003, end_log_pos 76110900
Galera 节点上的复制设置:
[mysqld]
log_slave_updates=1
log_bin=mysql-bin
gtid_mode=ON
enforce_gtid_consistency=1
expire_logs_days=7
server_id = 3 # 1 for node1, 2 for node2, 3 for node3
binlog_format=ROW
也许您知道如何解决它?
对于设置我使用了这个主题: http ://severalnines.com/blog/how-set-asynchronous-replication-galera-cluster-standalone-mysql-server-gtid
Galera 节点版本:5.6.25
MySQL从版本:5.6.27