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. https://gist.github.com/dtest/86db850f26f19d8c7bb81b95f6241f31#file-show-slave-status-sql 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: https://gist.github.com/dtest/86db850f26f19d8c7bb81b95f6241f31#file-mysql-56-sql Keep in mind that certain versions of 5.1 might give false information if the Slave_IO_Thread was not running. But if you upgrade to MySQL 5.7 and your application relies on anything other than SHOW SLAVE STATUS output, it might be broken.
In MySQL 5.7, you would get this: https://gist.github.com/dtest/86db850f26f19d8c7bb81b95f6241f31#file-without_56_compat-sql The reason is that MySQL is moving away from the information_schema GLOBAL_STATUS and SESSION_STATUS tables in preference for performance_schema. The correct way to get the status of slave running in MySQL 5.7 outside of SHOW SLAVE STATUS is to use the new replication-based performance_schema tables:
Looking to optimize your MySQL use?