对应关系
文件 | 表 |
master.info | mysql.slave_master_info |
relay-log.info | mysql.slave_relay_log_info |
下面是从官方文档整理出来的 master.info 文件和 mysql.slave_master_info 表和 show slave status 命令的输出中的各字段对应关系:
Line in master.info File | slave_master_info Table Column | SHOW SLAVE STATUS Column | Description |
---|---|---|---|
1 | Number_of_lines | [None] | Number of lines in the file, or columns in the table |
2 | Master_log_name | Master_Log_File | The name of the master binary log currently being read from the master |
3 | Master_log_pos | Read_Master_Log_Pos | The current position within the master binary log that have been read from the master |
4 | Host | Master_Host | The host name of the master |
5 | User_name | Master_User | The user name used to connect to the master |
6 | User_password | Password (not shown by SHOW SLAVE STATUS ) | The password used to connect to the master |
7 | Port | Master_Port | The network port used to connect to the master |
8 | Connect_retry | Connect_Retry | The period (in seconds) that the slave will wait before trying to reconnect to the master |
9 | Enabled_ssl | Master_SSL_Allowed | Indicates whether the server supports SSL connections |
10 | Ssl_ca | Master_SSL_CA_File | The file used for the Certificate Authority (CA) certificate |
11 | Ssl_capath | Master_SSL_CA_Path | The path to the Certificate Authority (CA) certificates |
12 | Ssl_cert | Master_SSL_Cert | The name of the SSL certificate file |
13 | Ssl_cipher | Master_SSL_Cipher | The list of possible ciphers used in the handshake for the SSL connection |
14 | Ssl_key | Master_SSL_Key | The name of the SSL key file |
15 | Ssl_verify_server_cert | Master_SSL_Verify_Server_Cert | Whether to verify the server certificate |
16 | Heartbeat | [None] | Interval between replication heartbeats, in seconds |
17 | Bind | Master_Bind | Which of the slave's network interfaces should be used for connecting to the master |
18 | Ignored_server_ids | Replicate_Ignore_Server_Ids | The list of server IDs to be ignored. Note that for Ignored_server_ids the list of server IDs is preceded by the total number of server IDs to ignore. |
19 | Uuid | Master_UUID | The master's unique ID |
20 | Retry_count | Master_Retry_Count | Maximum number of reconnection attempts permitted |
21 | Ssl_crl | [None] | Path to an ssl certificate revocation list file |
22 | Ssl_crl_path | [None] | Path to a directory containing ssl certificate revocation list files |
23 | Enabled_auto_position | Auto_position | If autopositioning is in use or not |
24 | Channel_name | Channel_name | The name of the replication channel |
下面是从官方文档整理出来的 relay-log.info 文件和 mysql.slave_relay_log_info 表和 show slave status 命令的输出中的各字段对应关系:
Line in relay-log.info | slave_relay_log_info Table Column | SHOW SLAVE STATUS Column | Description |
---|---|---|---|
1 | Number_of_lines | [None] | Number of lines in the file or columns in the table |
2 | Relay_log_name | Relay_Log_File | The name of the current relay log file |
3 | Relay_log_pos | Relay_Log_Pos | The current position within the relay log file; events up to this position have been executed on the slave database |
4 | Master_log_name | Relay_Master_Log_File | The name of the master binary log file from which the events in the relay log file were read |
5 | Master_log_pos | Exec_Master_Log_Pos | The equivalent position within the master's binary log file of events that have already been executed |
6 | Sql_delay | SQL_Delay | The number of seconds that the slave must lag the master |
7 | Number_of_workers | [None] | The number of slave worker threads for executing replication events (transactions) in parallel |
8 | Id | [None] | ID used for internal purposes; currently this is always 1 |
9 | Channel_name | Channel_name | The name of the replication channel |
在旧版本(MySQL 5.6之前), relay-log.info
信息如下,并且系统不存在 slave_relog_log_info表
Line | Status Column | Description |
---|---|---|
1 | Relay_Log_File | The name of the current relay log file |
2 | Relay_Log_Pos | The current position within the relay log file; events up to this position have been executed on the slave database |
3 | Relay_Master_Log_File | The name of the master binary log file from which the events in the relay log file were read |
4 | Exec_Master_Log_Pos | The equivalent position within the master's binary log file of events that have already been executed |