slave_master_info - xiaoboluo768/mysql-system-schema GitHub Wiki
-
该表提供查询IO线程读取主库的位置信息,以及从库连接主库的IP、账号、端口、密码等信息
-
表结构定义
CREATE TABLE `slave_master_info` (
`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',
`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',
`Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'The host name of the master.',
`User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',
`User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',
`Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',
`Connect_retry` int(10) unsigned NOT NULL COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',
`Enabled_ssl` tinyint(1) NOT NULL COMMENT 'Indicates whether the server supports SSL connections.',
`Ssl_ca` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',
`Ssl_capath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',
`Ssl_cert` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',
`Ssl_cipher` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',
`Ssl_key` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',
`Ssl_verify_server_cert` tinyint(1) NOT NULL COMMENT 'Whether to verify the server certificate.',
`Heartbeat` float NOT NULL,
`Bind` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',
`Ignored_server_ids` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored, followed by the actual server IDs',
`Uuid` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',
`Retry_count` bigint(20) unsigned NOT NULL COMMENT 'Number of reconnect attempts, to the master, before giving up.',
`Ssl_crl` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',
`Ssl_crlpath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',
`Enabled_auto_position` tinyint(1) NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',
`Channel_name` char(64) NOT NULL COMMENT 'The channel on which the slave is connected to a source. Used in Multisource Replication',
`Tls_version` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Tls version',
PRIMARY KEY (`Channel_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information';
- 表字段与show slave status输出字段、master.info文件中的行信息对应关系及其表字段含义如下:
master.info文件中的行数 | mysql.slave_master_info表字段 | show slave status命令输出字段 | 字段含义描述 |
---|---|---|---|
1 | Number_of_lines | [None] | 表示master.info中的信息行数或者slave_master_info表中的信息字段数 |
2 | Master_log_name | Master_Log_File | 表示从库IO线程当前读取主库最新的binlog file名称 |
3 | Master_log_pos | Read_Master_Log_Pos | 表示从库IO线程当前读取主库最新的binlog position |
4 | Host | Master_Host | 表示从库IO线程当前正连接的主库IO或者主机名 |
5 | User_name | Master_User | 表示从库IO线程用于连接主库用户名 |
6 | User_password | [None] | 表示从库IO线程用于连接主库的用户密码 |
7 | Port | Master_Port | 表示从库IO线程所连接主库的网络端口 |
8 | Connect_retry | Connect_Retry | 表示从库IO线程断线重连主库的间隔时间,单位为秒,默认值为60 |
9 | Enabled_ssl | Master_SSL_Allowed | 表示主从之间的连接是否支持SSL |
10 | Ssl_ca | Master_SSL_CA_File | 表示CA(Certificate Authority )认证文件名 |
11 | Ssl_capath | Master_SSL_CA_Path | 表示CA(Certificate Authority )认证文件路径 |
12 | Ssl_cert | Master_SSL_Cert | 表示SSL认证证书文件名 |
13 | Ssl_cipher | Master_SSL_Cipher | 表示用于SSL连接握手中可能使用到的密码列表 |
14 | Ssl_key | Master_SSL_Key | 表示SSL认证的密钥文件名 |
15 | Ssl_verify_server_cert | Master_SSL_Verify_Server_Cert | 表示是否需要校验server的证书 |
16 | Heartbeat | [None] | 表示主从之间的复制心跳包的间隔时间,单位为秒 |
17 | Bind | Master_Bind | 表示从库可用于连接主库的网络接口,默认为空 |
18 | Ignored_server_ids | Replicate_Ignore_Server_Ids | 表示从库复制需要忽略哪些server-id,注意:这是一个列表,第一个数字表示需要忽略的实例server-id总数 |
19 | Uuid | Master_UUID | 表示主库的UUID |
20 | Retry_count | Master_Retry_Count | 表示从库最大允许重连主库的次数 |
21 | Ssl_crl | [None] | SSL证书撤销列表文件的路径 |
22 | Ssl_crl_path | [None] | 包含ssl证书吊销列表文件的目录路径 |
23 | Enabled_auto_position | Auto_position | 表示从库是否启用在主库中自动寻找位置的功能(使用1时启动自动寻找位置,如果使用auto_position=0,则不会自耦东找位置) |
24 | Channel_name | Channel_name | 表示从库复制通道名称,一个通道代表一个复制源 |
25 | Tls_Version | Master_TLS_Version | 表示在Master上的TLS版本号 |
- 表记录内容示例
root@localhost : mysql 01:08:29> select * from slave_master_info\G;
*************************** 1. row ***************************
Number_of_lines: 25
Master_log_name: mysql-bin.000292
Master_log_pos: 194
Host: 192.168.2.148
User_name: qfsys
User_password: letsg0
Port: 3306
Connect_retry: 60
Enabled_ssl: 0
Ssl_ca:
Ssl_capath:
Ssl_cert:
Ssl_cipher:
Ssl_key:
Ssl_verify_server_cert: 0
Heartbeat: 5
Bind:
Ignored_server_ids: 0
Uuid: ec123678-5e26-11e7-9d38-000c295e08a0
Retry_count: 86400
Ssl_crl:
Ssl_crlpath:
Enabled_auto_position: 0
Channel_name:
Tls_version:
1 row in set (0.00 sec)
上一篇: servers表 | 下一篇: slave_relay_log_info表