mysql> SHOW BINARY LOGS;
+------------------+-----------+
| Log_name | File_size |
+------------------+-----------+
| mysql-bin.002022 | 817345 |
| mysql-bin.002023 | 817932 |
| mysql-bin.002024 | 816758 |
| mysql-bin.002025 | 665265 |
+------------------+-----------+
4 rows in set (0.01 sec)
显示主从相关
mysql> SHOW SLAVE HOSTS;
Empty set (0.00 sec)
mysql> SHOW SLAVE STATUS;
Empty set (0.00 sec)
mysql> SHOW RELAYLOG EVENTS limit 10;
+--------------------+-----+----------------+------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+--------------------+-----+----------------+------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| slave-relay.001351 | 4 | Format_desc | 1339158577 | 123 | Server ver: 5.7.20-log, Binlog ver: 4 |
| slave-relay.001351 | 123 | Previous_gtids | 1339158577 | 194 | 4941480b-c2fa-11e8-850c-506b4bbe1cf4:1-3111622 |
| slave-relay.001351 | 194 | Rotate | 2241191473 | 0 | mysql-bin.001063;pos=4 |
| slave-relay.001351 | 241 | Format_desc | 2241191473 | 123 | Server ver: 5.7.20-log, Binlog ver: 4 |
| slave-relay.001351 | 360 | Rotate | 0 | 407 | mysql-bin.001063;pos=234 |
| slave-relay.001351 | 407 | Gtid | 2241191473 | 299 | SET @@SESSION.GTID_NEXT= '4941480b-c2fa-11e8-850c-506b4bbe1cf4:3111623' |
| slave-relay.001351 | 472 | Query | 2241191473 | 539 | /* rds internal mark */ CREATE TABLE IF NOT EXISTS mysql.ha_health_check (
id BIGINT DEFAULT 0,
type CHAR(1) DEFAULT '0',
PRIMARY KEY (type)
)
ENGINE = InnoDB |
| slave-relay.001351 | 712 | Gtid | 2241191473 | 604 | SET @@SESSION.GTID_NEXT= '4941480b-c2fa-11e8-850c-506b4bbe1cf4:3111624' |
| slave-relay.001351 | 777 | Query | 2241191473 | 672 | BEGIN |
| slave-relay.001351 | 845 | Table_map | 2241191473 | 734 | table_id: 81659 (mysql.ha_health_check) |
+--------------------+-----+----------------+------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10 rows in set (0.01 sec)