GTID restore the multi-source mode of replication and part of an example of building
a building
1 mysqldump derived
MySQL -B DB1> a.sql
MySQL -B DB2> b.sql
2 profile is set filtering rules
replicate_wild_do_table = DB1.%
Replicate_wild_do_table = DB2.%
3 introducing forced
MySQL -f <a.sql
MySQL -f <b.sql
. 4 for Change
the CHANGE MASTER_HOST the MASTER the TO = '127.0.0.1', MASTER_PORT = 3306, MASTER_USER = 'the repl', MASTER_PASSWORD = 'the repl', =. 1 MASTER_AUTO_POSITION the CHANNEL the FOR '3306';
the CHANGE MASTER_HOST the MASTER the TO = '127.0.0.1', MASTER_PORT = 3307, MASTER_USER = 'the repl', MASTER_PASSWORD = 'the repl', the FOR. 1 MASTER_AUTO_POSITION the CHANNEL = '3307';
5 set to ignore the transaction
. 1 RESET Master
2 is set purge filter a.sql b.sql
3 SET @@ GLOBAL.GTID_PURGED = '36a6ec7d- c959-11e9-9ade-60fa9dffe49b: 1-3,94ff46c0-680f-11e9-b5a9-60fa9dffe49b: 1-2,36a6ec7d-c959-11e9-9ade-60fa9dffe49b: 1-3 '
6 start copy
start Slave
7 to see if the replication process normally
two repair to re-import a library
1 STOP Slave for Channel' 3307 '&& drop the DB2 database
2 MySQL the DB2 -B> b.sql re-export the new library
3 mysql -f <b re-introducing new library .sql
4 stop slave replication stops all slave acquired this time gtid_purge
. 5 filter b.sql obtain gtid_purge
. 6 RESET Master set @@ GLOBAL.GTID_PURGED = 4 perform steps steps GTID + 5 GTID
. 7 the MASTER the tO the CHANGE = MASTER_HOST '127.0.0.1', MASTER_PORT = 3307, MASTER_USER = 'the repl', MASTER_PASSWORD = 'the repl', the FOR. 1 MASTER_AUTO_POSITION the CHANNEL = '3307';
. 8 Slave Start
mysql Case ~ GTID multi-source copy
Guess you like
Origin www.cnblogs.com/danhuangpai/p/11465928.html
Recommended
Ranking