{"id":14869,"date":"2024-11-27T11:04:20","date_gmt":"2024-11-27T03:04:20","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=14869"},"modified":"2024-11-27T13:46:31","modified_gmt":"2024-11-27T05:46:31","slug":"%e6%b5%81%e6%b0%b4%e6%8a%a5%e9%94%99slave-failed-to-initialize-relay-log-info-structure-from-the-repository","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=14869","title":{"rendered":"\u6d41\u6c34\u62a5\u9519Slave failed to initialize relay log info structure from the repository"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u51fa\u73b0\u4e86Txsql\u4e3b\u4ece\u8282\u70b9\u6d41\u6c34\u4e0d\u540c\u7684\u60c5\u51b5\uff0c\u5177\u4f53\u8868\u73b0\u65e5\u5fd7\u91cc\uff1a[ERROR] Slave SQL: Slave failed to initialize relay log info structure from the repository\uff0cslave\u6d41\u6c34\u5168\u9762\u505c\u6ede\u4e14\u65e0\u6cd5\u542f\u52a8slave(slave\u6570\u636e\u635f\u574f)\u3002\u9700\u8981reset slave\u6765\u4fee\u590d\u6d41\u6c34<\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<p>\u6d41\u6c34\u4fee\u590d\u7684\u65b9\u6848\uff1a<br \/>\n\u8fdb\u6d41\u6c34\u505c\u6ede\u7684slave\u8282\u70b9\u7684pod\u4e2d\uff0c\u6267\u884c\u5982\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<pre><code class=\"language-shell\">cd \/usr\/bin\/txsql\/tools\n.\/txsql.sh dump all.sql #\u5bfc\u51faall.sql\u6587\u4ef6\n.\/txsql.sh manual_mode enable #\u8fdb\u5165manual\u6a21\u5f0f\uff0c\u5728\u8be5\u6a21\u5f0f\u4e0b\u670d\u52a1\u4e0d\u4f1a\u91cd\u542f\n.\/txsql.sh kill phxbinlogsvr #kill binlog\u8fdb\u7a0b\uff0c\u7981\u6b62slave\u81ea\u52a8\u62c9\u53d6binlog\n.\/txsql.sh localshell\n\nmysql> set global super_read_only=0; \u8bbe\u7f6esuper\u7528\u6237\u8bfb\u5199mysql\u6743\u9650\nmysql> set global read_only=0;\u8bbe\u7f6e\u666e\u901a\u7528\u6237\u8bfb\u5199mysql\u6743\u9650\nmysql> set sql_log_bin = 0;\u8bbe\u7f6e\u672c\u6b21\u8fde\u63a5mysql\u7684session\u91cc\u9762\u6240\u8f93\u5165\u7684\u8bed\u53e5\u90fd\u4e0d\u4f1a\u88ab\u8ba1\u5165bin_log\u91cc\u9762\nmysql> stop slave;\u505c\u6b62slave\nmysql> reset slave;\u6e05\u9664slave\u4e0a\u7684\u540c\u6b65\u4f4d\u7f6e\uff0c\u5220\u9664\u6240\u6709\u65e7\u7684\u540c\u6b65\u65e5\u5fd7\uff0c\u4f7f\u7528\u65b0\u7684\u65e5\u5fd7\u91cd\u65b0\u5f00\u59cb\nmysql> reset master;\u5c06\u5220\u9664\u6240\u6709\u7684\u4e8c\u8fdb\u5236\u65e5\u5fd7\uff0c\u521b\u5efa\u4e00\u4e2a.000001\u7684\u7a7a\u65e5\u5fd7\u3002RESET MASTER\u5e76\u4e0d\u4f1a\u5f71\u54cdSLAVE\u670d\u52a1\u5668\u4e0a\u7684\u5de5\u4f5c\u72b6\u6001\uff0c\u6240\u4ee5\u76f2\u76ee\u7684\u6267\u884c\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5bfc\u81f4slave\u627e\u4e0d\u5230master\u7684binlog\uff0c\u9020\u6210\u540c\u6b65\u5931\u8d25\u3002\nmysql> source all.sql;\u5bfc\u5165 all.sql\u6587\u4ef6\nmysql> exit \u9000\u51fa\n\n.\/txsql.sh manual_mode disable \u9000\u51famanual\u6a21\u5f0f<\/code><\/pre>\n<h3>\u5176\u4ed6\u4fe1\u606f<\/h3>\n<hr \/>\n<p>\u5982\u679c\u5f53\u524d\u8282\u70b9\u7684\u6d41\u6c34\u505c\u6ede\u4e86\uff0c\u4f46\u662f\u6d41\u6c34\u5374\u6ca1\u6709\u843d\u540e\u4e8emaster\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528txsql.sh kill mysql<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u51fa\u73b0\u4e86Txsql\u4e3b\u4ece\u8282\u70b9\u6d41\u6c34\u4e0d\u540c\u7684\u60c5\u51b5\uff0c\u5177\u4f53\u8868\u73b0\u65e5\u5fd7\u91cc\uff1a[ERROR] Slave SQL: Sla ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=14869\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":161,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14869","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/14869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14869"}],"version-history":[{"count":3,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/14869\/revisions"}],"predecessor-version":[{"id":14872,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/14869\/revisions\/14872"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}