MySQueaL Resources

resources for mysql admins and developers who are squealing for help

More Resources

Main Doc Pages
Comments
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (Ca'Grande, Milan, Italy)

SHOW SLAVE STATUS Statement

This MySQL statement displays information on the slave thread.

hits past month: 8 ;  last updated: may 4, 2009 - 2:34am ;  parent: MySQL Replication

Syntax

SHOW SLAVE STATUS

Explanation

This MySQL statement displays information on the slave thread of a system running replication.

Examples

Here is an example of this MySQL statement and its results:

SHOW SLAVE STATUS \G
*************************** 1. row ***************************
       Slave_IO_State: Waiting for master to send event
          Master_Host: localhost
          Master_User: root
          Master_Port: 3306
        Connect_Retry: 5
      Master_Log_File: log-bin.000154
  Read_Master_Log_Pos: 159
       Relay_Log_File: log-relay-bin.154
        Relay_Log_Pos: 694
Relay_Master_Log_File: log-bin.154
     Slave_IO_Running: Yes
    Slave_SQL_Running: Yes
      Replicate_Do_DB:
  Replicate_Ignore_DB:
           Last_Errno: 0
           Last_Error:
         Skip_Counter: 0
  Exec_Master_Log_Pos: 159
      Relay_Log_Space: 694
      Until_Condition: None
       Until_Log_File:
        Until_Log_Pos: 0
   Master_SSL_Allowed: Yes
   Master_SSL_CA_File: ssl_ca.dat
   Master_SSL_CA_Path: /data/mysql/ssl_ca
      Master_SSL_Cert: ssl_cert.dat
    Master_SSL_Cipher:
       Master_SSL_Key:
Seconds_Behind_Master: 3

You can set some of these values at startup with the MySQL server daemon (mysqld). You can also set some of these variables with the MySQL statement, SET, and you can adjust others for particular tables with the ALTER TABLE statement. You can reset some of the log file variables with the RESET MASTER and RESET SLAVE statements.

Return to MySQL Replication page of our MySQL Documentation