If you run MySQL in a production environment chances are you are using a master/slave replication set-up. This brings two major benefits: higher availability (multiple nodes to read from) and quicker response times (when doing reads from slaves).
When you are running a master/slave replication set-up, monitoring the replication state becomes critical. Especially when doing reads from slave nodes you want them to stay in sync as much as possible. Using a simple Bash script we can easily monitor the replication link state.
Read on to learn how to detect master/slave replication problems
