Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to capture only status/result of Slave_IO_Running and Slave_SQL_Running column values, which I will be using to integrate into our application.

Is there any way to get only the values of those fields instead of getting values of all fields of SHOW SLAVE STATUS.

My OS is windows.

I am using MySQL 5.0.24

share|improve this question
up vote 4 down vote accepted


mysql> SHOW STATUS LIKE 'Slave_running';
| Variable_name | Value |
| Slave_running | ON    |
1 row in set (0.04 sec)

From the manual:

This is ON if this server is a replication slave that is connected to a replication master, and both the I/O and SQL threads are running; otherwise, it is OFF.

Caveat: If you're running MySQL prior to version 5.1.46 or 5.5.4, it's possible the slave IO thread could not be running, and the status variable indicate the slave is running. (MySQL Bug 51089)

share|improve this answer
I have experienced that dozens of times. The IO Thread does not really ping itself internally. It should. +1 for mentioning this IO Thread phenomenon. – RolandoMySQLDBA Sep 30 '11 at 16:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.