m2复制m1配置;
m1先reset
RESET MASTER
m2里配置:
CHANGE MASTER TO MASTER_HOST='172.20.0.2', MASTER_USER='slave', MASTER_PASSWORD='123456', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=154;
START SLAVE
SHOW SLAVE STATUS 测试;
m1复制m2配置;
m2先rest
RESET MASTER
m1里配置:
CHANGE MASTER TO MASTER_HOST='172.20.0.5', MASTER_USER='slave', MASTER_PASSWORD='123456', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=154;
START SLAVE
SHOW SLAVE STATUS 测试;
上一篇:2对mysql主从复制搭建