SHOW SLAVE STATUS

This MySQL statement displays information on the slave thread.

Syntax

Below is the syntax for this command. Text within square brackets (i.e, [ and ] ) are optional. Choices are separated by bars (i.e, | ). Ellipses preceded by a comma indicates a repeating pattern. Ellipses before or after syntax are used to highlight a relevant except from the larger syntax. Text displayed in italic letters represent text that should be replaced with the specific names related to the database (e.g., column with the name of the column).

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.