Most people know that you can use SHOW SLAVE STATUS to verify if a slave is running in MySQL. Most people also know that you need to check both Slave_IO_Running and Slave_SQL_Running.
View the code on Gist.
A few years ago, I responded to a question on dba.stackexchange.com on how to verify if a slave is running outside of SHOW SLAVE STATUS.
Prior to MySQL 5.7, you could get this information from SHOW GLOBAL STATUS:
View the code on Gist.
Keep in mind that certain versions of 5.1 …
[Read more]