{"id":528,"date":"2026-01-27T02:52:30","date_gmt":"2026-01-27T02:52:30","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=528"},"modified":"2026-01-28T06:24:12","modified_gmt":"2026-01-28T06:24:12","slug":"mysql8-0-%e6%89%a7%e8%a1%8c%e8%84%9a%e6%9c%ac%e6%81%a2%e5%a4%8d%e6%8a%a5%e9%94%99global-gtid_purged-cannot-be-changed-the-added-gtid-set-must-not-overlap-with","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=528","title":{"rendered":"MySQL8.0 \u6267\u884c\u811a\u672c\u6062\u590d\u62a5\u9519@@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\u4ece\u7ebf\u4e0a dump \u51fa sql \u811a\u672c\uff0c\u6062\u590d\u5230\u672c\u5730\u65b0\u5efa\u6570\u636e\u5e93\u62a5\u9519\u3002\n\n\n\n\n\u5728\u590d\u5236\u540e\u6267\u884csql\u5bfc\u5165\u6570\u636e\u5e93\u7684\u65f6\u5019\uff0c\u62a5\u9519:@@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@GLOBAL.GTID_EXECUTED\u3002\n\n\n--\n-- GTID state at the beginning of the backup\n-- (origin: @@global.gtid_executed)\n--\n\n\n\n\nSET @@GLOBAL.GTID_PURGED=\/*!80000 '+'*\/ '1b801a9f-df7d-11ee-98e3-fa163ef24bae:1-450116';\n\n\n\n\n\u8fd9\u662fmysql5.6\u53ca\u4ee5\u540e\u7684\u65b0\u7279\u6027GTID\u3002\n\n\n\n\n  GTID\u5373\u5168\u5c40\u4e8b\u52a1ID\uff08global transaction identifier\uff09\uff0cGTID\u5b9e\u9645\u4e0a\u662f\u7531UUID+TID\u7ec4\u6210\u7684\u3002\u5176\u4e2dUUID\u662f\u4e00\u4e2aMySQL\u5b9e\u4f8b\u7684\u552f\u4e00\u6807\u8bc6\u3002TID\u4ee3\u8868\u4e86\u8be5\u5b9e\u4f8b\u4e0a\u5df2\u7ecf\u63d0\u4ea4\u7684\u4e8b\u52a1\u6570\u91cf\uff0c\u5e76\u4e14\u968f\u7740\u4e8b\u52a1\u63d0\u4ea4\u5355\u8c03\u9012\u589e\uff0c\u6240\u4ee5GTID\u80fd\u591f\u4fdd\u8bc1\u6bcf\u4e2aMySQL\u5b9e\u4f8b\u4e8b\u52a1\u7684\u6267\u884c\uff08\u4e0d\u4f1a\u91cd\u590d\u6267\u884c\u540c\u4e00\u4e2a\u4e8b\u52a1\uff0c\u5e76\u4e14\u4f1a\u8865\u5168\u6ca1\u6709\u6267\u884c\u7684\u4e8b\u52a1\uff09\u3002\n\n\n\n\n\u5904\u7406\u529e\u6cd5\n\n\n\n\n\u91cd\u65b0 dump \u6570\u636e\u5e93, \u4f7f\u7528--set-gtid-purged=OFF\u7684\u53c2\u6570\u7981\u6b62\ud83d\udeab\u5bfc\u51fa GTID \u4fe1\u606f,\u518d load \u8fdb\u76ee\u6807\u6570\u636e\u5e93\n\u5728\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u6267\u884c\n\n\n\n\nmysql&gt; reset slave all;\n\n\n\n\nmysql&gt; reset master;\n\n\n\n\n\u6e05\u7a7a\u6240\u6709 GTID \u4fe1\u606f\u4e4b\u540e\u5c31\u53ef\u4ee5\u6b63\u5e38\u5bfc\u5165\u3002<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-528","post","type-post","status-publish","format-standard","hentry","category-8"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=528"}],"version-history":[{"count":2,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":599,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions\/599"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}