完全完整的MySQL数据库复制?有想法吗?人们在做什么? [英] Full complete MySQL database replication? Ideas? What do people do?

查看:69
本文介绍了完全完整的MySQL数据库复制?有想法吗?人们在做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有两台运行MySQL的Linux服务器,一台位于我旁边的机架上,位于10 Mbit/s的上载管道下(主服务器),另外几英里位于3 Mbit/s的上载管道上(镜像) ).

Currently I have two Linux servers running MySQL, one sitting on a rack right next to me under a 10 Mbit/s upload pipe (main server) and another some couple of miles away on a 3 Mbit/s upload pipe (mirror).

我希望能够在两个服务器上连续复制数据,但是遇到了很多障碍.其中之一是,在MySQL主/从配置下,不时出现一些语句(!),意思是;有些登录到镜像URL的人看不到我知道在主服务器上的数据,反之亦然.假设这是每月一次有意义的数据块上发生的一次,所以我可以忍受它,并假设它是一个丢失的数据包"问题(即,上帝知道,但我们会赔偿).

I want to be able to replicate data on both servers continuously, but have run into several roadblocks. One of them being, under MySQL master/slave configurations, every now and then, some statements drop (!), meaning; some people logging on to the mirror URL don't see data that I know is on the main server and vice versa. Let's say this happens on a meaningful block of data once every month, so I can live with it and assume it's a "lost packet" issue (i.e., god knows, but we'll compensate).

另一个最重要(也是令人讨厌的)重复出现的问题是,由于某种原因,我们在一端进行了重大的上载或更新(或重新启动),并且必须

The other most important (and annoying) recurring issue is that, when for some reason we do a major upload or update (or reboot) on one end and have to sever the link, then LOAD DATA FROM MASTER doesn't work and I have to manually dump on one end and upload on the other, quite a task nowadays moving some .5 TB worth of data.

是否有用于此的软件?我知道MySQL(公司")将其作为一项非常昂贵的服务(完整的数据库复制)提供.人们在那里做什么?它的结构方式是,我们运行自动故障转移,如果其中一台服务器未启动,则主URL只会解析为另一台服务器.

Is there software for this? I know MySQL (the "corporation") offers this as a VERY expensive service (full database replication). What do people out there do? The way it's structured, we run an automatic failover where if one server is not up, then the main URL just resolves to the other server.

推荐答案

我们在Percona提供免费的工具来检测主服务器和服务器之间的差异,并通过重新应用最少的更改使它们恢复同步.

We at Percona offer free tools to detect discrepancies between master and server, and to get them back in sync by re-applying minimal changes.

  • pt-table-checksum
  • pt-table-sync

这篇关于完全完整的MySQL数据库复制?有想法吗?人们在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆