mysql主从同步改为双向同步的问题
迷茫
迷茫 2017-04-17 14:41:53
0
2
681

公司项目原先配置了两台主机进行Mysql主从同步,server_a里的appdb库实时同步到server_b。:

server_a

server-id       = 1
binlog-do-db = appdb

server_b

server-id       = 2
replicate-do-db = appdb

现在出现了一个新的需求,serber_b上的appdb库里有个单独的表 appdb.userlog(只在server_b上产生数据),需要同步回server_a。
那么如果现在把server_a的master设置成server_b同步回去的话可行吗?
会不会变成一个死循环( b->a->b )?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
洪涛

Have you not considered things like redis?
Obviously a is the host, and b is the backup. The data generated on it should be something excavated when it is idle, right? I personally think it is better to store this kind of data separately, such as server-C or redis cache.

大家讲道理

mysql dual master synchronization

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!