问题描述:

Mysql 主从 Gtid 配置报错: Last_SQL_Errno: 1032 Last_SQL_Error: Coordinator stopped because _mysql

     Slave_IO_Running: Yes

           Slave_SQL_Running: No

             Replicate_Do_DB:

         Replicate_Ignore_DB:

          Replicate_Do_Table:

      Replicate_Ignore_Table:

     Replicate_Wild_Do_Table:

 Replicate_Wild_Ignore_Table:

                  Last_Errno: 1032

                  Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: W orker 1 failed executing transaction '23dcfd11-07f5-11ee-8621-000c29b9af73:1' at master log mysql-bin.000002, end_log_pos 860. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

......

解决方案:

mysql> stop slave;

Query OK, 0 rows affected (0.01 sec)

mysql> set @@session.gtid_next='23dcfd11-07f5-11ee-8621-000c29b9af73:1';

Query OK, 0 rows affected (0.00 sec)

mysql> begin;commit;

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql> set @@session.gtid_next=automatic;

Query OK, 0 rows affected (0.00 sec)

mysql> start slave;

Query OK, 0 rows affected (0.02 sec)

mysql> show slave status\G;

*************************** 1. row ***************************

              Slave_IO_State: Waiting for master to send event

                 Master_Host: 192.168.188.61

                 Master_User: repl

                 Master_Port: 3306

               Connect_Retry: 60

             Master_Log_File: mysql-bin.000003

         Read_Master_Log_Pos: 194

              Relay_Log_File: relay-bin.000005

               Relay_Log_Pos: 407

       Relay_Master_Log_File: mysql-bin.000003

            Slave_IO_Running: Yes

           Slave_SQL_Running: Yes

             Replicate_Do_DB:

......