PHP script to check MySQL replication status
If you have MySQL replication running in either a master-slave or master-master type setup then don’t assume everything is running perfectly all the time. Power cuts and other disasters do happen so you need to check periodically to ensure it’s all working. This post has a PHP script to check for any MySQL replication errors and then emails if there are any issues