Search the MySQL manual:

4.10.7.13 SHOW SLAVE STATUS (slave)

Provides status information on essential parameters of the slave threads (Slave). If you type it in the mysql client, you can put a \G instead of a semicolon at the end, to get a vertical, more readable layout:

SLAVE> show slave status\G
*************************** 1. row ***************************
          Master_Host: localhost
          Master_User: root
          Master_Port: 3306
        Connect_retry: 3
      Master_Log_File: gbichot-bin.005
  Read_Master_Log_Pos: 79
       Relay_Log_File: gbichot-relay-bin.005
        Relay_Log_Pos: 548
Relay_Master_Log_File: gbichot-bin.005
     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: 79
      Relay_log_space: 552
1 row in set (0.00 sec)

User Comments

Posted by Nathan Tanner on Friday August 8 2003, @1:48pm[Delete] [Edit]

NOTE on MySQL 4.0.14: In cyclical replication, with log-slave-updates = ON, Exec_master_log_pos tends report spurious values. It will often return a correct value, but almost as often return the current 'Pos' value of its own master log file.

It will return the incorrect value when it sees a BINLOG event in its MASTER that has its own server-id. It silently ignores the binlog event, but still stores the binlog event's Original_log_pos as the Exec_master_log_pos.

Just to warn those who might rely on this value in subsequent CHANGE MASTER commands, it cannot be trusted in this sort of setup.

Add your own comment.