<p>I've had a tough time setting up my replication server. Is there any program (OS X, Windows, Linux, or PHP no problem) that lets me monitor and resolve replication issues? (btw, for those following, I've been on this issue <a href="https://stackoverflow.com/questions/8166/mysql-replication-if-i-dont-specify-any-databases-will-logbin-log-everything">here</a>, <a href="https://stackoverflow.com/questions/3798/full-complete-mysql-db-replication-ideas-what-do-people-do">here</a>, <a href="https://stackoverflow.com/questions/8365/mysql-administrator-backups-compatibility-mode-what-exactly-is-this-doing">here</a> and <a href="https://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors">here</a>)</p>
<p>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!</p>
<p>As always, even after sync, I run into this kind of show-stopping error:</p>
<pre><code>Error 'Duplicate entry '252440' for key 1' on query.
</code></pre>
<p>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.</p>
<p><strong>Edit</strong>: going through my previous questions i found <a href="https://stackoverflow.com/questions/30660/mysql-binary-log-replication-can-it-be-set-to-ignore-errors#30889">this</a> which helps tremendously. I'm still all ears on the monitoring solution.</p>

[{'answer_id': 35438, 'author': 'Alexandru Nedelcu', 'author_id': 3280, 'author_profile': 'https://Stackoverflow.com/users/3280', 'pm_score': 3, 'selected': True, 'text': '<p>To monitor the servers we use the free <a href="http://www.maatkit.org/tools.html" rel="nofollow noreferrer">tools from Maatkit</a> ... simple, yet efficient.</p>\n\n<p>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.</p>\n\n<p>We use a Master-Master replication with a MySql Proxy as a load-balancer in front, and to prevent it from having errors:</p>\n\n<ul>\n<li>we removed all unique indexes</li>\n<li>for the few cases where we really needed unique constraints we made sure we used REPLACE instead of INSERT (MySql Proxy can be used to guard for proper usage ... it can even rewrite your queries)</li>\n<li>scheduled scripts doing intensive reports are always accessing the same server (not the load-balancer) ... so that dangerous operations are replicated safely</li>\n</ul>\n\n<p>Yeah, I know it sounds simple and stupid, but it solved 95% of all the problems we had.</p>\n'}, {'answer_id': 45929, 'author': 'Eric Hogue', 'author_id': 4137, 'author_profile': 'https://Stackoverflow.com/users/4137', 'pm_score': 0, 'selected': False, 'text': '<p>We use mysql replication to replicate data to close to 30 servers. We monitor them with nagios. You can probably check the replication status and use an event handler to restart it with \'SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; Start Slave;\'. That will fix the error, but you\'ll lose the insert that caused the error. </p>\n\n<p>About the error, do you use memory tables on your slaves? I ask this because the only time we ever got a lot of these error they where caused by a bug in the latests releases of mysql. \'Delete From Table Where Field = Value\' will delete only one row in memory tables even though they where multiple rows.</p>\n\n<p><a href="http://bugs.mysql.com/bug.php?id=30590" rel="nofollow noreferrer">mysql bug descritpion</a></p>\n'}]
['https://Stackoverflow.com/questions/35420', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/547/']