在搭建好mysql主从之后,我们一般在从库上通过命令
show slave status\G
来查看主从的状态,会有很多的参数,接下来笔者就带大家好好的了解这些参数
root@localhost (none)>show slave status\G
*************************** 1. row ***************************Slave_IO_State: Waiting formaster to send event
Master_Host: 192.168.1.100Master_User: mysync
Master_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.001822Read_Master_Log_Pos: 290072815Relay_Log_File: mysqld-relay-bin.005201Relay_Log_Pos: 256529594Relay_Master_Log_File: mysql-bin.001821Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0Last_Error:
Skip_Counter: 0Exec_Master_Log_Pos: 256529431Relay_Log_Space: 709504534Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 2923Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0Last_IO_Error:
Last_SQL_Errno: 0Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1Master_UUID: 13ee75bb-99e2-11e6-be4d-b499baa80e6e
Master_Info_File: /home/data/mysql/master.infoSQL_Delay: 0SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Reading event from the relay log
Master_Retry_Count: 86400Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath: