MySQL双向复制技术详解
2010-08-23 15:58:30 来源:WEB开发网核心提示:重启MySQL在主服务器B MySQL命令符下:showmasterstatus;+--+--+---+--+|File|Position|Binlog_Do_DB|Binlog_Ignore_DB|+--+--+---+--+|updatelog.000028|13753|test|mysql|+--+--+---+
重启MySQL
在主服务器B MySQL命令符下:
show master status;
+------------------+----------+-------------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+-------------------+------------------+
| updatelog.000028 | 13753 | test | mysql |
+------------------+----------+-------------------+------------------+
在服务器A MySQL命令符下:
slave stop;
CHANGE MASTER TO MASTER_LOG_FILE='updatelog.000028',MASTER_LOG_POS=13753;
slave start;
其实也就是A->B单向同步的反向操作!双向同步,就这么简单啦!
更多精彩
赞助商链接