How to create mysql replication with multiple master server and with single slave server? how to edit the "CHANGE MASTER TO MASTER_HOST='',MASTER_USER='slave_user', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS= 107; " command to channelise different master db at the same time.

closed as too broad by mustaccio, Md Haidar Ali Khan, MDCCL, hot2use, LowlyDBA Oct 8 '18 at 20:39

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • @Akina I have used Innodb engine to create the schemas . – Dheeraj Gupta Oct 5 '18 at 12:19
  • No-no. You will use mysql_multi to create separate "virtual" slaves attached to slave databases using federated. – Akina Oct 5 '18 at 12:35
  • What version? Only newer versions allow multiple masters to talk to one Slave, if that is what you are aiming for. – Rick James Oct 16 '18 at 4:44

You need to modify the master and relay repositories to be stored into tables and then define channels for each master.

SET GLOBAL master_info_repository = 'TABLE';
SET GLOBAL relay_log_info_repository = 'TABLE';

MASTER_LOG_FILE='master1-bin.000006', MASTER_LOG_POS=628 FOR CHANNEL 'master-1';

Refer: https://dev.mysql.com/doc/refman/5.7/en/replication-multi-source.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.