java1234开源博客系统
博客信息

m1和m2配置互为主从复制

0
发布时间:『 2020-03-06 22:00』  博客类别:Mycat  阅读(130)

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 测试;

 

 


关键字:   无
关注Java1234微信公众号
博主信息
Java1234_小锋
(知识改变命运,技术改变世界)
Powered by Java1234 V3.0 Copyright © 2012-2016 Java知识分享网 版权所有