How to verify if a slave running in MySQL 5.7
- IO Thread: performance_schema.replication_connection_status
- SQL Thread (single master):performance_schema.replication_applier_status
Conclusion
If your applications (monitoring or other) rely on checking that slaves are running by utilizing the information schema GLOBAL_STATUS table, upgrading to MySQL 5.7 will break it. You have a few choices:- Use SHOW SLAVE STATUS directly and parse the output of Slave_IO_Running and Slave_SQL_Running. This requires application changes.
- Use the new performance_schema replication tables performance_schema.replication_connection_status and performance_schema.replication_applier_status. This also requires an application change. And it should be noted that there are other tables for multi-master setups!
- Use the compatibility variable show_compatibility_56. This is dynamic and doesn't require application changes. However, this variable is immediately deprecated and will go away in a future release, so you will be required to update your application at some point anyway.
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
When SHOW SLAVE STATUS and the error log Disagree
When SHOW SLAVE STATUS and the error log Disagree
Apr 25, 2008 12:00:00 AM
3
min read
When SHOW SLAVE STATUS lies
When SHOW SLAVE STATUS lies
Apr 6, 2008 12:00:00 AM
3
min read
MySQL 5.7 Multi-threads replication operation tips
MySQL 5.7 Multi-threads replication operation tips
Feb 16, 2018 12:00:00 AM
2
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.