简体   繁体   中英

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?

I have a three nodes in Galera Cluster and I want to set up gtid replication to MySQL slave. The problem that is all Galera nodes write their own bin logs and seems it causing duplication queries. 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:

[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

Galera nodes version: 5.6.25

MySQL slave version: 5.6.27

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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