mysql1062错误 gtid_mysql8.0.17复制搭建及其gtid的1062和1032异常

--模拟 1062 故障--主库

CREATE TABLE`info_area` (

`id`int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '地区ID',

`name`varchar(20) NOT NULL DEFAULT '' COMMENT '名称',

`rel_id`varchar(50) NOT NULL DEFAULT '' COMMENT '关系ID',

`pid`int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',

`level` int(11) NOT NULL DEFAULT '0' COMMENT '类别,1、省份 2、市 3、区 4、县',PRIMARY KEY(`id`),UNIQUE KEY`UNQ_RID` (`rel_id`) USING BTREE,KEY`IDX_PID` (`rel_id`)

) ENGINE=InnoDB AUTO_INCREMENT=55185 DEFAULT CHARSET=utf8mb4 COMMENT='地区表';INSERT INTO `info_area` (`id`, `name`, `rel_id`, `pid`, `level`) VALUES ('10000', '北京', '10000', '10000', '1');INSERT INTO `info_area` (`id`, `name`, `rel_id`, `pid`, `level`) VALUES ('10002', '三环以内', '100001000110002', '10001', '3');INSERT INTO `info_area` (`id`, `name`, `rel_id`, `pid`, `level`) VALUES ('10003', '三环到四环之间', '100001000110003', '10001', '3');

mysql> select * frominfo_area;+-------+-----------------------+-----------------+-------+-------+

| id | name | rel_id | pid | level |

+-------+-----------------------+-----------------+-------+-------+

| 10000 | 北京 | 10000 | 10000 | 1 |

| 10002 | 三环以内 | 100001000110002 | 10001 | 3 |

| 10003 | 三环到四环之间 | 100001000110003 | 10001 | 3 |

+-------+-----------------------+-----------------+-------+-------+

3 rows in set (0.00sec)--从库上执行

set sql_log_bin=0;INSERT INTO `info_area` (`id`, `name`, `rel_id`, `pid`, `level`) VALUES ('10001', '朝阳区', '1000010001', '10000', '2');set sql_log_bin=1;--主库

INSERT INTO `info_area` (`id`, `name`, `rel_id`, `pid`, `level`) VALUES ('10001', '朝阳区', '1000010001', '10000', '2');--从库

show slave status\G;

mysql>show slave status\G;*************************** 1. row ***************************Slave_IO_State: Waitingfor master tosend event

Master_Host:10.192.30.53Master_User: repl

Master_Port:3306Connect_Retry:60Master_Log_File: mysql-bin.000002Read_Master_Log_Pos:705517Relay_Log_File: fudao_db_cluster_003-relay-bin.000003Relay_Log_Pos:2478Relay_Master_Log_File: mysql-bin.000002Slave_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: test.%,information_schema.%Last_Errno:1062Last_Error: Coordinator stopped because there were error(s)in the worker(s). The most recent failure being: Worker 1 failed executing transaction '46760eb0-bcb3-11e9-a352-24a9c4e7e87e:79' at master log mysql-bin.000002, end_log_pos 705486. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

Skip_Counter:0Exec_Master_Log_Pos:705195Relay_Log_Space:5837Until_Condition: None

Until_Log_File:

Until_Log_Pos:0Master_SSL_Allowed: No

Master_SSL_CA_File:

Master_SSL_CA_Path:

Master_SSL_Cert:

Master_SSL_Cipher:

Master_SSL_Key:

Seconds_Behind_Master:NULLMaster_SSL_Verify_Server_Cert: No

Last_IO_Errno:0Last_IO_Error:

Last_SQL_Errno:1062Last_SQL_Error: Coordinator stopped because there were error(s)in the worker(s). The most recent failure being: Worker 1 failed executing transaction '46760eb0-bcb3-11e9-a352-24a9c4e7e87e:79' at master log mysql-bin.000002, end_log_pos 705486. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

Replicate_Ignore_Server_Ids:

Master_Server_Id:3306Master_UUID: 46760eb0-bcb3-11e9-a352-24a9c4e7e87e

Master_Info_File: mysql.slave_master_info

SQL_Delay:0SQL_Remaining_Delay:NULLSlave_SQL_Running_State:

Master_Retry_Count:86400Master_Bind:

Last_IO_Error_Timestamp:

Last_SQL_Error_Timestamp:190813 13:47:05Master_SSL_Crl:

Master_SSL_Crlpath:

Retrieved_Gtid_Set: 46760eb0-bcb3-11e9-a352-24a9c4e7e87e:66-79Executed_Gtid_Set: 46760eb0-bcb3-11e9-a352-24a9c4e7e87e:1-78Auto_Position:1Replicate_Rewrite_DB:

Channel_Name:

Master_TLS_Version:

Master_public_key_path:

Get_master_public_key:0Network_Namespace:1 row in set (0.00sec)

ERROR:

No query specified

mysql>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值