mysql软件:有什么建议来监督我的mysql复制服务器? [英] mysql software: any suggestions to oversee my mysql replication server?

查看:93
本文介绍了mysql软件:有什么建议来监督我的mysql复制服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置复制服务器时遇到了困难.是否有任何程序(OS X,Win,Linux或php没问题)可以监视和解决复制问题? (顺便说一句,对于那些-uhm-以下的人,我一直在这个问题上这里这里此处.我会以错误的方式进行操作,否则我必须非常胖)

I've had a tough time setting up my replication server. Is there any program (OS X, Win, Linux or php no problem) that lets me monitor and resolve replication issues? (btw, for those -uhm- following, ive been on this issue here, here, here and here. Either i'm going about this the wrong way or i must be immensely thick)

我的生产数据库的大小在不断增长.每次数据库复制停止并且数据库不可避免地开始滑出不同步状态.我上次从转储进行的重新同步花费了将近4个小时!

My production database is several megs in size and growing. Every time the database replication stops and the databases inevitably begin to slide out of sync i cringe. My last resync from dump took almost 4 hours roundtrip!

一如既往,即使在同步后,我也遇到了这种显示停止错误":

As always, even after sync, I run into this kind of show-stopping error":

Error 'Duplicate entry '252440' for key 1' on query.

如果有某种方法可以密切监视发生的事情,也许让软件处理它,我会喜欢的.我什至为服务公司着迷,这可能会帮助我更好地监控我的数据.或者是另一种完全镜像的方式.

I would love it if there was some way to closely monitor whats going on and perhaps let the software deal with it. I'm even all ears for service companies which may help me monitor my data better. Or an alternate way to mirror altogether.

编辑:仔细阅读我以前的问题,发现

Edit: going through my previous questions i found this which helps tremendously. I'm still all ears on the monitoring solution.

欢呼

/mp

推荐答案

要监视服务器,我们使用免费的 Maatkit的工具 ...简单而有效.

To monitor the servers we use the free tools from Maatkit ... simple, yet efficient.

二进制复制在5.1中可用,所以我想您有一些地方.我们仍然使用5.0,它可以正常工作,但是当然我们也遇到了一些问题.

The binary replication is available in 5.1, so I guess you've got some balls. We still use 5.0 and it works OK, but of course we had our share of issues with it.

我们将Master-Master复制与MySql Proxy用作前端的负载均衡器,以防止出现错误:

We use a Master-Master replication with a MySql Proxy as a load-balancer in front, and to prevent it from having errors:

  • 我们删除了所有唯一索引
  • 在少数确实需要唯一约束的情况下,请确保我们使用REPLACE而不是INSERT(MySql Proxy可用于维护正确的使用...甚至可以重写您的查询)
  • 执行密集报告的计划脚本始终访问同一服务器(而不是负载平衡器)...,以便安全地复制危险操作

是的,我知道这听起来很简单而且很愚蠢,但是它解决了我们遇到的所有问题中的95%.

Yeah, I know it sounds simple and stupid, but it solved 95% of all the problems we had.

这篇关于mysql软件:有什么建议来监督我的mysql复制服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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