pt-slave-find
pt-slave-find打印主从复制关系,若在从库执行需要指明主库登录信息
重启slave前
[root@tcandyj ~]# pt-slave-find -u root -p wtc.com -P38383 -h 39.107.13.9 -D wtc
39.107.13.9:38383
Version 5.7.36-log
Server ID 1
Uptime 4+21:43:36 (started 2022-01-21T15:07:55)
Replication Is not a slave, has 1 slaves connected, is not read_only
Filters
Binary logging ROW
Slave status
Slave mode STRICT
Auto-increment increment 1, offset 1
InnoDB version 5.7.36
+- [default]:38383
Version 5.7.37-log
Server ID 2
Uptime 4+21:35:11 (started 2022-01-21T15:16:20)
Replication Is a slave, has 0 slaves connected, is not read_only
Filters
Binary logging ROW
Slave status 0 seconds behind, running, no errors
Slave mode STRICT
Auto-increment increment 1, offset 1
InnoDB version 5.7.37
重启slave后
[root@tcandyj ~]# pt-slave-find -u root -p wtc.com -P38383 -h 39.107.13.9 -D wtc
39.107.13.9:38383
Version 5.7.36-log
Server ID 1
Uptime 4+21:44:59 (started 2022-01-21T15:07:55)
Replication Is not a slave, has 1 slaves connected, is not read_only
Filters
Binary logging ROW
Slave status
Slave mode STRICT
Auto-increment increment 1, offset 1
InnoDB version 5.7.36
+- [default]:38383
Version 5.7.37-log
Server ID 2
Uptime 00:17 (started 2022-01-26T12:52:37)
Replication Is a slave, has 0 slaves connected, is not read_only
Filters
Binary logging ROW
Slave status 0 seconds behind, running, no errors
Slave mode STRICT
Auto-increment increment 1, offset 1
InnoDB version 5.7.37