报错内容:
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Slave has more GTIDs than the master
has, using the master’s SERVER_UUID. This may indicate that the end of
the binary log was truncated or that the last binary log file was
lost, e.g., after a power or disk failure when sync_binlog != 1. The
master may or may not have rolled back transactions that were already
replica’
Last_SQL_Errno: 0
Last_SQL_Error: Replicate_Ignore_Server_Ids:
Master_Server_Id: 35
Master_UUID: ea586309-458d-11ee-93ef-000c29ec39e3
Master_Info_File: /var/lib/mysql/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp: 230829 19:42:58
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 71945dff-463e-11ee-8ed0-000c296ce7ca:1-2,
ea586309-458d-11ee-93ef-000c29ec39e3:1:4:7-11
Auto_Position: 1
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version: 1 row in set (0.00 sec)
意思就是说 你在做gtid主从时,从库的事务id比主库还多 怎么解?
1,在从库上执行 reset master;reset slave all;
2,再在从库上执行 change master to ....
命令就好了