简体   繁体   English

注入空事务以修复MySQL 5.6 GTID复制不起作用

[英]Injecting empty transactions to repair MySQL 5.6 GTID replication doesn't work

I follows the steps on this page 我按照此页面上的步骤进行操作

STOP SLAVE;
SET GTID_NEXT="[THE GTID SET]";
BEGIN; COMMIT;
SET GTID_NEXT="AUTOMATIC";
START SLAVE;

to restore the slave. 恢复奴隶。 But in my case, the gtid_set are as 但就我而言,gtid_set是

Retrieved_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:2369-2377
Executed_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:1-2372:2374,8be5b0ba-5ad3-11e6-a31f-0cc47a50d072:1-12

When I tried to inject empty transactions to the slave and restart the slave, the 'slave_SQL_Running' is still 'No'. 当我尝试向从服务器注入空事务并重新启动从服务器时,“ slave_SQL_Running”仍然为“ No”。

STOP SLAVE;
SET GTID_NEXT="8b6d4795-5ad3-11e6-a31f-00259077c77a:2377";
BEGIN; COMMIT;
SET GTID_NEXT=AUTOMATIC;
START SLAVE;

And it becomes 它变成

Retrieved_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:2369-2377
Executed_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:1-2372:2374:2377,8be5b0ba-5ad3-11e6-a31f-0cc47a50d072:1-12

and when new data is inserted to master, the slave still can't sync to the master. 当将新数据插入主服务器时,从属服务器仍无法与主服务器同步。 The status becomes: 状态变为:

Retrieved_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:2369-2378
Executed_Gtid_Set: 8b6d4795-5ad3-11e6-a31f-00259077c77a:1-2372:2374:2377,8be5b0ba-5ad3-11e6-a31f-0cc47a50d072:1-12

How can I make this work? 我该如何进行这项工作?

I don't want to do a full dump since there's lots of data, while fulldump takes a lot of time. 我不想进行完全转储,因为有很多数据,而完全转储需要很多时间。

Please check below blog post. 请检查下面的博客文章。

https://www.abhinavbit.com/2019/05/gtid-replication-skip-transaction-using.html https://www.abhinavbit.com/2019/05/gtid-replication-skip-transaction-using.html

In your case you should have run below command to skip the sql threads error. 在您的情况下,您应该运行以下命令来跳过sql线程错误。

STOP SLAVE;
SET GTID_NEXT="8b6d4795-5ad3-11e6-a31f-00259077c77a:2375";
BEGIN; COMMIT;
SET GTID_NEXT=AUTOMATIC;
START SLAVE;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM