本文总结了主从复制的原理及日常运维的坑
前言
本文总结了主从复制的原理及日常运维的坑
📣 1.主从复制简介
📣 2.主从复制原理
📣 3.机房掉电主从故障
✨ 3.1 故障现象
发现从库的GTID比主库的GTID要大
--主库的GTID
mysql> show master status\G
*************************** 1. row ***************************
File: MMK-JEM-Master1-ip31-bin.000002
Position: 195
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: c5833cbf-fa39-11ee-ae67-0242c0a8441f:1-5
1 row in set (0.00 sec)
--从库执行的GTID
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 46081bff-fa3a-11ee-9d8b-0242c0a84420:1-7,
c5833cbf-fa39-11ee-ae67-0242c0a8441f:1-2:6
Auto_Position: 1