master2: create database mdb2; use mdb2; create table t2(id int);
slave: (product)root@localhost [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mdb1 | | mdb2 | | mysql | | performance_schema | | sys | +--------------------+ 6 rows in set (0.00 sec)
(product)root@localhost [(none)]> use mdb1; Database changed (product)root@localhost [mdb1]> show tables; +----------------+ | Tables_in_mdb1 | +----------------+ | t1 | +----------------+ 1 row in set (0.00 sec)
(product)root@localhost [mdb1]> use mdb2; Database changed (product)root@localhost [mdb2]> show tables; +----------------+ | Tables_in_mdb2 | +----------------+ | t2 | +----------------+ 1 row in set (0.00 sec)
六.相关问题 1.多源复制处理之一: binlog+position: stop slave sql_thread for channel 'master-65303306'; set sql_slave_skip_counter=n; start slave sql_thread for channel 'master-65303306';
gtid: stop slave sql_thread for channel 'master-65303306'; set gtid_next='uuid-N'; begin;commit; set gtid_next='automatic'; start slave sql_thread for channel 'master-65303306'; 2.从多源复制处理之二: Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000181' at 154, the last event read from '/data/mysql/mysql3306/logs/mysql-bin.000181' at 123, the last byte read from '/data/mysql/mysql3306/logs/mysql-bin.000181' at 154.'