Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # multi source replication
- ## limiting
- * slave server is must be enabled some parameter
- ```
- --master-info-repository=TABLE --relay-log-info-repository=TABLE
- ```
- ## settings
- Add parameter my.cnf.
- ```
- master-info-repository=TABLE
- relay-log-info-repository=TABLE
- ```
- Determinate channel by change master to statement.
- ```
- CHANGE MASTER TO
- MASTER_HOST='192.168.33.20',
- MASTER_PORT=3306,
- MASTER_LOG_FILE='pxc1-bin.000001',
- MASTER_LOG_POS=846
- FOR CHANNEL 'pxc1';
- ```
- for gtid based
- ```
- CHANGE MASTER TO
- MASTER_HOST='192.168.33.20',
- MASTER_PORT=3306,
- MASTER_AUTO_POSITION=1
- FOR CHANNEL 'pxc1';
- ```
- ## start replication
- ```
- start slave user='rep' password='password' FOR CHANNEL 'pxc1';
- ```
- ## stop replication
- ```
- stop slave FOR CHANNEL 'pxc1';
- ```
- ## test multisource replication time slise version database create by pxc
- ```
- CHANGE MASTER TO
- MASTER_HOST='192.168.33.20',
- MASTER_PORT=3306,
- MASTER_LOG_FILE='pxc1-bin.000001',
- MASTER_LOG_POS=846 ,
- MASTER_DELAY=30
- FOR CHANNEL 'pxc1';
- CHANGE MASTER TO
- MASTER_HOST='192.168.33.20',
- MASTER_PORT=3306,
- MASTER_LOG_FILE='pxc1-bin.000001',
- MASTER_LOG_POS=846 ,
- MASTER_DELAY=60
- FOR CHANNEL 'pxc2';
- CHANGE MASTER TO
- MASTER_HOST='192.168.33.20',
- MASTER_PORT=3306,
- MASTER_LOG_FILE='pxc1-bin.000001',
- MASTER_LOG_POS=846 ,
- MASTER_DELAY=90
- FOR CHANNEL 'pxc3';
- ```
- use case 1. master is gtid based multi master.
- Failover can be done by stopping the slave when the node goes down and starting the slave.
- use case 2. each master node replicate use defferent time master_delay. Could have time slies version table.
- note : I can not do that for now.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement