Syntax\n------\n\nSHOW { SLAVE | REPLICA} ["connection_name"] STATUS [FOR CHANNEL "connection_name"]\n\nDescription\n-----------\n\nThis statement is to be run on a slave and provides status information on essential parameters of the slave threads.\n\nThis statement requires the SLAVE MONITOR privilege.\n\nThis statement requires the SLAVE MONITOR privilege.\n\nThis statement requires the REPLICATION SLAVE ADMIN privilege.\n\nMulti-Source\n\nThe ALL and "connection_name" options allow you to connect to many primaries at the same time.\n\nALL SLAVES gives you a list of all connections to the master nodes.\n\nALL SLAVES gives you a list of all connections to the master nodes.\n\nThe rows are sorted according to Connection_name.\n\nIf you specify a connection_name, you only get the information about that connection. If connection_name is not used, then the name set by default_master_connection is used. If the connection name doesn't exist you will get an error:There is no master connection for 'xxx'.\n\nMariaDB starting with 10.7.0\n\nThe FOR CHANNEL keyword was added for MySQL compatibility. This is identical to using the channel_name directly after SHOW SLAVE.\n\nColumn Descriptions\n\nThe order in which the columns appear depends on the MariaDB version. This means that extracting a column value is best done by comparing the field name instead of using a fixed offset into the row.\n\nThese columns can also be viewed/extracted from the INFORMATION_SCHEMA.SLAVE_STATUS table.\n\nThese columns cannot be viewed/extracted from the INFORMATION_SCHEMA.SLAVE_STATUS table.\n\nConnection_name: Name of the master connection. Returned with SHOW ALL SLAVES STATUS only.\n\nSlave_SQL_State: State of SQL thread. Returned with SHOW ALL SLAVES STATUSonly. See Slave SQL Thread States. Slave_IO_State: State of I/O thread. See Slave I/O Thread States.\n\nConnection_name: Name of the master connection. Returned with SHOW ALL SLAVES STATUS only.\n\nSlave_SQL_State: State of SQL thread. Returned with SHOW ALL SLAVES STATUS only. See Slave SQL Thread States. Slave_IO_State: State of I/O thread. See Slave I/O Thread States.\n\nMaster_host: Master host that the slave is connected to.\n\nMaster_user: Account user name being used to connect to the master.\n\nMaster_port: The port being used to connect to the master.\n\nConnect_Retry: Time in seconds between retries to connect. The default is 60. The CHANGE MASTER TO statement can set this. The master-retry-count option determines the maximum number of reconnection attempts.\n\nMaster_Log_File: Name of the master binary log file that the I/O thread is currently reading from.\n\nRead_Master_Log_Pos: Position up to which the I/O thread has read in the current master binary log file.\n\nRelay_Log_File: Name of the relay log file that the SQL thread is currently processing.\n\nRelay_Log_Pos: Position up to which the SQL thread has finished processing in the current relay log file.\n\nRelay_Master_Log_File: Name of the master binary log file that contains the most recent event executed by the SQL thread.\n\nSlave_IO_Running: Whether the slave I/O thread is running and connected (Yes), running but not connected to a master (Connecting) or not running (No).\n\nSlave_SQL_Running: Whether or not the SQL thread is running.\n\nReplicate_Do_DB: Databases specified for replicating with the replicate_do_db option.\n\nReplicate_Ignore_DB: Databases specified for ignoring with the replicate_ignore_db option.\n\nReplicate_Do_Table: Tables specified for replicating with the replicate_do_table option.\n\nReplicate_Ignore_Table: Tables specified for ignoring with the replicate_ignore_table option.\n\nReplicate_Wild_Do_Table: Tables specified for replicating with the replicate_wild_do_table option.\n\nReplicate_Wild_Ignore_Table: Tables specified for ignoring with the replicate_wild_ignore_table option.\n\nLast_Errno: Alias for Last_SQL_Errno (see below)\n\nLast_Error: Alias for Last_SQL_Error (see below)\n\nSkip_Counter: Number of events that a slave skips from the master, as recorded in the sql_slave_skip_counter system variable.\n\nExec_Master_Log_Pos: Position up to which the SQL thread has processed in the current master binary log file. Can be used to start a new slave from a current slave with the CHANGE MASTER TO ... MASTER_LOG_POS option.\n\nRelay_Log_Space: Total size of all relay log files combined.\n\nUntil_Condition: One of four possible values: None, Master, Relay, or Gtid, depending on the respective START SLAVE UNTIL condition.\n\nUntil_Log_File: The MASTER_LOG_FILE value of the START SLAVE UNTIL condition.\n\nUntil_Log_Pos: The MASTER_LOG_POS value of the START SLAVE UNTIL condition.\n\nMaster_SSL_Allowed: Whether an SSL connection is permitted (Yes), not permitted (No) or permitted but without the slave having SSL support enabled (Ignored)\n\nMaster_SSL_CA_File: The MASTER_SSL_CA option of the CHANGE MASTER TO statement.\n\nMaster_SSL_CA_Path: The MASTER_SSL_CAPATH option of the CHANGE MASTER TO statement.\n\nMaster_SSL_Cert: The MASTER_SSL_CERT option of the CHANGE MASTER TO statement.\n\nMaster_SSL_Cipher: The MASTER_SSL_CIPHER option of the CHANGE MASTER TO statement.\n\nMaster_SSL_Key: The MASTER_SSL_KEY option of the CHANGE MASTER TO statement.\n\nSeconds_Behind_Master: Difference between the timestamp logged on the master for the event that the slave is currently processing, and the current timestamp on the slave. Zero if the slave is not currently processing an event. With serial replication, seconds_behind_master is updated when the SQL thread begins executing a transaction. With parallel replication, seconds_behind_master is updated only after transactions commit. An exception is thrown on the parallel slave to additionally update seconds_behind_master when the first transaction received after idling is queued to a worker for execution, to provide a reliable initial value for the duration until a transaction commits.\n\nAdditional behavior to be aware of:\n\n1. Seconds_Behind_Master will update for ignored events, e.g. those skipped due to sql_slave_skip_counter.\n2. On the serial slave, transactions with prior timestamps can update Seconds_Behind_Master such that it can go backwards, though this is not true for the parallel slave.\n3. When configured with MASTER_DELAY, as a replicated transaction begins executing (i.e. on a serial or post-idle parallel slave), Seconds_Behind_Master will update before delaying, and while delaying occurs will grow to encompass the configured value.\n4. There is a known issue, tracked by MDEV-17516, such that Seconds_Behind_Master will initially present as 0 on slave restart until a replicated transaction begins executing, even if the last slave session was lagging behind when stopped.\n\nSeconds_Behind_Master: Difference between the timestamp logged on the master for the event that the slave is currently processing, and the current timestamp on the slave. Zero if the slave is not currently processing an event. With serial replication, seconds_behind_master is updated when the SQL thread begins executing a transaction. With parallel replication, seconds_behind_master is updated only after transactions commit.\n\nAdditional behavior to be aware of:\n\n1. Seconds_Behind_Master will update for ignored events, e.g. those skipped due to sql_slave_skip_counter.\n2. On the serial slave, transactions with prior timestamps can update Seconds_Behind_Master such that it can go backwards, though this is not true for the parallel slave.\n3. When configured with MASTER_DELAY, as a replicated transaction begins executing (i.e. on a serial or post-idle parallel slave), Seconds_Behind_Master will update before delaying, and while delaying occurs will grow to encompass the configured value.\n4. There is a known issue, tracked by MDEV-17516, such that Seconds_Behind_Master will initially present as 0 on slave restart until a replicated transaction begins executing, even if the last slave session was lagging behind when stopped.\n\nMaster_SSL_Verify_Server_Cert: The MASTER_SSL_VERIFY_SERVER_CERT option of the CHANGE MASTER TO statement.\n\nLast_IO_Errno: Error code of the most recent error that caused the I/O thread to stop (also recorded in the slave's error log). 0 means no error. RESET SLAVE or RESET MASTER will reset this value.\n\nLast_IO_Error: Error message of the most recent error that caused the I/O thread to stop (also recorded in the slave's error log). An empty string means no error. RESET SLAVE or RESET MASTER will reset this value.\n\nLast_SQL_Errno: Error code of the most recent error that caused the SQL thread to stop (also recorded in the slave's error log). 0 means no error. RESET SLAVE or RESET MASTER will reset this value.\n\nLast_SQL_Error: Error message of the most recent error that caused the SQL thread to stop (also recorded in the slave's error log). An empty string means no error. RESET SLAVE or RESET MASTER will reset this value.\n\nReplicate_Ignore_Server_Ids: List of server_ids that are currently being ignored for replication purposes, or an empty string for none, as specified in the IGNORE_SERVER_IDS option of the CHANGE MASTER TO statement.\n\nMaster_Server_Id: The master's server_id value.\n\nMaster_SSL_Crl: The MASTER_SSL_CRL option of the CHANGE MASTER TO statement.\n\nMaster_SSL_Crlpath: The MASTER_SSL_CRLPATH option of the CHANGE MASTER TO statement.\n\nUsing_Gtid: Whether or not global transaction ID's are being used for replication (can be No, Slave_Pos, or Current_Pos).\n\nGtid_IO_Pos: Current global transaction ID value.\n\nReplicate_Do_Domain_Ids: List of domain_ids that are currently being recognized for replication purposes, or an empty string for none, as specified in the DO_DOMAIN_IDS option of the CHANGE MASTER TO statement.\n\nReplicate_Ignore_Domain_Ids: List of domain_ids that are currently being ignored for replication purposes, or an empty string for none, as specified in the IGNORE_DOMAIN_IDS option of the CHANGE MASTER TO statement.\n\nParallel_Mode: The in-order parallel replication mode as configured by the slave_parallel_mode system variable.\n\nSQL_Delay: Value specified by MASTER_DELAY in CHANGE MASTER (or 0 if none).\n\nSQL_Remaining_Delay: When the slave is delaying the execution of an event due to MASTER_DELAY, this is the number of seconds of delay remaining before the event will be applied. Otherwise, the value is NULL.\n\nSlave_SQL_Running_State: The state of the SQL driver threads, same as in SHOW PROCESSLIST. When the slave is delaying the execution of an event due to MASTER_DELAY, this field displays: "Waiting until MASTER_DELAY seconds after master executed event".\n\nSlave_DDL_Groups: This status variable counts the occurrence of DDL statements. This is a slave-side counter for optimistic parallel replication.\n\nSlave_Non_Transactional_Groups: This status variable counts the occurrence of non-transactional event groups. This is a slave-side counter for optimistic parallel replication.\n\nSlave_Transactional_Groups: This status variable counts the occurrence of transactional event groups. This is a slave-side counter for optimistic parallel replication.\n\nReplicate_Rewrite_DB: Databases specified for replicating and rewriting with the replicate_rewrite_db system variable/option.\n\nReplica_Rewrite_DB is not available.\n\nRetried_transactions: The number of times that replicating transactions have been retried due to temporary errors (e.g. deadlocks in parallel replication). Returned with SHOW ALL SLAVES STATUS only.\n\nMax_relay_log_size: Max relay log size for this connection. Returned with SHOW ALL SLAVES STATUS only.\n\nExecuted_log_entries: Number of binary log events that have been executed, irrespective of error outcome (i.e. if the event execution results in an error, this number will still increase). Returned with SHOW ALL SLAVES STATUS only.\n\nSlave_received_heartbeats: Number of Heartbeat Log Events that the slave has received. Note this counter does not reset when the slave is restarted; only when a new CHANGE MASTER command has executed. Returned with SHOW ALL SLAVES STATUS only.\n\nSlave_heartbeat_period: Configured (by CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD) interval in seconds between replication heartbeats. Returned with SHOW ALL SLAVES STATUS only.\n\nGtid_Slave_Pos: The value of the global variable gtid_slave_pos, i.e. the GTID of the last event group replicated on a slave server, for each replication domain, as stored in the gtid_slave_pos system variable. Returned with SHOW ALL SLAVES STATUS only.\n\nMaster_last_event_time: Timestamp of the last event read from the master by the IO thread. NULL until the slave has started and the slave has read one query event from the master that changes data.\n\nSlave_last_event_time: Master timestamp of the last event committed on the slave. NULL until the slave has started and the slave has read one query event from the master that changes data.\n\nMaster_Slave_time_diff: The difference of the above two timestamps. NULL until the slave has started and the slave has read one query event from the master that changes data.\n\nMaster_last_event_time, Slave_last_event_time, and Master_Slave_time_diff are not available.\n\nConnects_Tried: The number of attempts done to connect to the master. It starts from 0 with _START_ SLAVE (but not STOP SLAVE), RESET SLAVE or CHANGE MASTER TO MASTER_RETRY_COUNT, and increments after each connection attempt until one succeeds or, after this reaches Master_Retry_Count, aborts the connection.\n\nMaster_Retry_Count: The limit to Connects_Tried as configured by CHANGE MASTER TO MASTER_RETRY_COUNT.\n\nConnects_Tried: and Master_Retry_Count: are not available. If the Performance Schema is enabled, replication_connection_configuration has CONNECTION_RETRY_COUNT available as an older alternative to Master_Retry_Count.\n\nExamples\n--------\n\nSHOW SLAVE STATUS\\G\n************************ 1. row ************************\n                Slave_IO_State: Waiting for master to send event\n                   Master_Host: db01.example.com\n                   Master_User: replicant\n                   Master_Port: 3306\n                 Connect_Retry: 60\n               Master_Log_File: mariadb-bin.000021\n           Read_Master_Log_Pos: 17315\n                Relay_Log_File: relay-bin.000042\n                 Relay_Log_Pos: 17446\n         Relay_Master_Log_File: mariadb-bin.000021\n              Slave_IO_Running: Yes\n             Slave_SQL_Running: Yes\n               Replicate_Do_DB: \n           Replicate_Ignore_DB: \n            Replicate_Do_Table: \n        Replicate_Ignore_Table: \n       Replicate_Wild_Do_Table: \n   Replicate_Wild_Ignore_Table: \n                    Last_Errno: 0\n                    Last_Error: \n                  Skip_Counter: 0\n           Exec_Master_Log_Pos: 17146\n               Relay_Log_Space: 17972\n               Until_Condition: None\n                Until_Log_File: \n                 Until_Log_Pos: 0\n            Master_SSL_Allowed: Yes\n            Master_SSL_CA_File: \n            Master_SSL_CA_Path:\n\n[Truncated — full content at mariadb.com/docs]