简体   繁体   English

在Galera Cluster和独立MySQL从站之间设置GTID复制

[英]Set up GTID replication between Galera Cluster and standalone MySQL slave

Anybody has experience with setting up replication between Galera Cluster and standalone MySQL slave? 有没有人在Galera Cluster和独立MySQL slave之间设置复制的经验?

I have a three nodes in Galera Cluster and I want to set up gtid replication to MySQL slave. 我在Galera Cluster中有三个节点,我想将gtid复制设置为MySQL slave。 The problem that is all Galera nodes write their own bin logs and seems it causing duplication queries. 所有Galera节点都编写自己的bin日志的问题,似乎它导致了重复查询。 As result, I get infinite errors like this: 结果,我得到了这样的无限错误:

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

replication settings on Galera nodes: 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

Maybe do you know how is possible to resolve it ? 也许你知道如何解决它吗?


For setting I used this topic: http://severalnines.com/blog/how-set-asynchronous-replication-galera-cluster-standalone-mysql-server-gtid 为了设置我使用了这个主题: http//severalnines.com/blog/how-set-asynchronous-replication-galera-cluster-standalone-mysql-server-gtid

Galera nodes version: 5.6.25 Galera节点版本:5.6.25

MySQL slave version: 5.6.27 MySQL slave版本:5.6.27

我为Galera群集中的所有节点设置了相同的server_id值,现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM