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.
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
InnoDB error: Total number of locks exceeds the lock table size
InnoDB error: Total number of locks exceeds the lock table size
May 19, 2011 12:00:00 AM
3
min read
pt-online -schema corner case: When you don’t want to replicate your alter activities across the whole cluster.
pt-online -schema corner case: When you don’t want to replicate your alter activities across the whole cluster.
Nov 21, 2022 12:00:00 AM
5
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.