MySQL Forums
Forum List  »  Replication

Multi source replication--identify which source the "insert/update" comes from
Posted by: Gabriel Wang
Date: June 23, 2015 09:20PM

Hi,
I'm building a multi-source replication on mysql 5.7.7-rc. The scenario in my side is there are multiple mysql instances, all of them has the same table structure, but with different data, all I need to do is to merge all the data into 1 replica mysql instance.
Therefore I planned to add 1 column in replica database tables named master-name, next step is to write a "before update/insert" trigger to update the replica table when every time insert/update come. BUT, I found it's not easy to identify the source of the insert/update.
Some findings from my side:
1. I can find replication channel information from table "performance_schema.replication_connection_configuration".
2. Also there is process information on information_schema.PROCESSLIST.

Which mysql master instance does the insert/update comes from?
Thanks in advance!


-Gabriel

Options: ReplyQuote


Subject
Views
Written By
Posted
Multi source replication--identify which source the "insert/update" comes from
1523
June 23, 2015 09:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.