lihongjie0209 / myblog

4 stars 0 forks source link

MySQL: show slave status 解释 #282

Open lihongjie0209 opened 3 years ago

lihongjie0209 commented 3 years ago
Name Description Added
Connection_name Name of the primary connection. Returned with SHOW ALL SLAVES STATUS (or SHOW ALL REPLICAS STATUS from MariaDB 10.5.1) only.  
Slave_SQL_State State of SQL thread. Returned with SHOW ALL SLAVES STATUS (or SHOW ALL REPLICAS STATUS from MariaDB 10.5.1) only. See Slave SQL Thread States.  
Slave_IO_State State of I/O thread. See Slave I/O Thread States.  
Master_host Master host that the replica is connected to.  
Master_user Account user name being used to connect to the primary.  
Master_port The port being used to connect to the primary.  
Connect_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.  
Master_Log_File Name of the primary binary log file that the I/O thread is currently reading from.  
Read_Master_Log_Pos Position up to which the I/O thread has read in the current primary binary log file.  
Relay_Log_File Name of the relay log file that the SQL thread is currently processing.  
Relay_Log_Pos Position up to which the SQL thread has finished processing in the current relay log file.  
Relay_Master_Log_File Name of the primary binary log file that contains the most recent event executed by the SQL thread.  
Slave_IO_Running Whether the replica I/O thread is running and connected (Yes), running but not connected to a primary (Connecting) or not running (No).  
Slave_SQL_Running Whether or not the SQL thread is running.  
Replicate_Do_DB Databases specified for replicating with the replicate_do_db option.  
Replicate_Ignore_DB Databases specified for ignoring with the replicate_ignore_db option.  
Replicate_Do_Table Tables specified for replicating with the replicate_do_table option.  
Replicate_Ignore_Table Tables specified for ignoring with the replicate_ignore_table option.  
Replicate_Wild_Do_Table Tables specified for replicating with the replicate_wild_do_table option.  
Replicate_Wild_Ignore_Table Tables specified for ignoring with the replicate_wild_ignore_table option.  
Last_Errno Alias for Last_SQL_Errno (see below)  
Last Error Alias for Last_SQL_Error (see below)  
Skip_Counter Number of events that a replica skips from the master, as recorded in the sql_slave_skip_counter system variable.  
Exec_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 replica from a current replica with the CHANGE MASTER TO ... MASTER_LOG_POS option.  
Relay_Log_Space Total size of all relay log files combined.  
Until_Condition    
Until_Log_File The MASTER_LOG_FILE value of the START SLAVE UNTIL condition.  
Until_Log_Pos The MASTER_LOG_POS value of the START SLAVE UNTIL condition.  
Master_SSL_Allowed Whether an SSL connection is permitted (Yes), not permitted (No) or permitted but without the replica having SSL support enabled (Ignored)  
Master_SSL_CA_File The MASTER_SSL_CA option of the CHANGE MASTER TO statement.  
Master_SSL_CA_Path The MASTER_SSL_CAPATH option of the CHANGE MASTER TO statement.  
Master_SSL_Cert The MASTER_SSL_CERT option of the CHANGE MASTER TO statement.  
Master_SSL_Cipher The MASTER_SSL_CIPHER option of the CHANGE MASTER TO statement.  
Master_SSL_Key The MASTER_SSL_KEY option of the CHANGE MASTER TO statement.  
Seconds_Behind_Master Difference between the timestamp logged on the master for the event that the replica is currently processing, and the current timestamp on the replica. Zero if the replica is not currently processing an event. From MariaDB 10.0.23 and MariaDB 10.1.9, with parallel replication, seconds_behind_master is updated only after transactions commit.  
Master_SSL_Verify_Server_Cert The MASTER_SSL_VERIFY_SERVER_CERT option of the CHANGE MASTER TO statement.  
Last_IO_Errno Error code of the most recent error that caused the I/O thread to stop (also recorded in the replica's error log). 0 means no error. RESET SLAVE or RESET MASTER will reset this value.  
Last_IO_Error Error message of the most recent error that caused the I/O thread to stop (also recorded in the replica's error log). An empty string means no error. RESET SLAVE or RESET MASTER will reset this value.  
Last_SQL_Errno Error code of the most recent error that caused the SQL thread to stop (also recorded in the replica's error log). 0 means no error. RESET SLAVE or RESET MASTER will reset this value.  
Last_SQL_Error Error message of the most recent error that caused the SQL thread to stop (also recorded in the replica's error log). An empty string means no error. RESET SLAVE or RESET MASTER will reset this value.  
Replicate_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.  
Master_Server_Id The master's server_id value.  
Master_SSL_Crl The MASTER_SSL_CRL option of the CHANGE MASTER TO statement. MariaDB 10.0
Master_SSL_Crlpath The MASTER_SSL_CRLPATH option of the CHANGE MASTER TO statement. MariaDB 10.0
Using_Gtid Whether or not global transaction ID's are being used for replication (can be No, Slave_Pos, or Current_Pos). MariaDB 10.0.2
Gtid_IO_Pos Current global transaction ID value. MariaDB 10.0.2
Retried_transactions Number of retried transactions for this connection. Returned with SHOW ALL SLAVES STATUS only.  
Max_relay_log_size Max relay log size for this connection. Returned with SHOW ALL SLAVES STATUS only.  
Executed_log_entries How many log entries the replica has executed. Returned with SHOW ALL SLAVES STATUS only.  
Slave_received_heartbeats How many heartbeats we have got from the master. Returned with SHOW ALL SLAVES STATUS only.  
Slave_heartbeat_period How often to request a heartbeat packet from the master (in seconds). Returned with SHOW ALL SLAVES STATUS only.  
Gtid_Slave_Pos GTID of the last event group replicated on a replica server, for each replication domain, as stored in the gtid_slave_pos system variable. Returned with SHOW ALL SLAVES STATUS only.  
SQL_Delay Value specified by MASTER_DELAY in CHANGE MASTER (or 0 if none). MariaDB 10.2.3
SQL_Remaining_Delay When the replica 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. MariaDB 10.2.3
Slave_SQL_Running_State The state of the SQL driver threads, same as in SHOW PROCESSLIST. When the replica is delaying the execution of an event due to MASTER_DELAY, this field displays: "Waiting until MASTER_DELAY seconds after master executed event". MariaDB 10.2.3
Slave_DDL_Groups This status variable counts the occurrence of DDL statements. This is a replica-side counter for optimistic parallel replication. MariaDB 10.3.7
Slave_Non_Transactional_Groups This status variable counts the occurrence of non-transactional event groups. This is a replica-side counter for optimistic parallel replication. MariaDB 10.3.7
Slave_Transactional_Groups This status variable counts the occurrence of transactional event groups. This is a replica-side counter for optimistic parallel replication. MariaDB 10.3.7