开发者

Create MySQL Replication Delay

Is there any wa开发者_如何转开发y to force a replication delay using MySQL? E.g. I want a slave to be 12 hours behind a master. Anyway to make this happen?


The Maatkit toolkit has a tool for this:

http://www.maatkit.org/doc/mk-slave-delay.html


Update: MySQL 5.6 is looking at adding replication delay:

http://forge.mysql.com/worklog/task.php?id=344

EDIT:

Link to details on availability in 5.6.2:

http://planet.mysql.com/entry/?id=27133


With MySQL-5.6 it is possible to delay the MySQL slave deliberately. At slave you need to configure: CHANGE MASTER TO MASTER_DELAY=X, where X=no of seconds you want the slave to lag behind originating master(the server at which the events are being generated). The lag is computed with respect to the time at which the originating master picked up the event for execution (not committed). Here is the documentation link http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.html You can find the complete design notes regarding this feature at http://dev.mysql.com/worklog/task/?id=344

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜