{"id":176317,"date":"2024-11-08T11:53:18","date_gmt":"2024-11-08T03:53:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/176317\/"},"modified":"2024-11-08T11:53:18","modified_gmt":"2024-11-08T03:53:18","slug":"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9mysql%e9%8c%af%e8%aa%a4-er_sync_slave_report_password_too_long","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/176317\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9MySQL\u932f\u8aa4 &#8211; ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG"},"content":{"rendered":"<h1 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9mysql%e9%8c%af%e8%aa%a4-er_sync_slave_report_password_too_long-qpCrKPwtRp\">\u5982\u4f55\u4fee\u5fa9MySQL\u932f\u8aa4 &#8211; ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG<\/h1>\n<p>\u5728\u4f7f\u7528MySQL\u9032\u884c\u6578\u64da\u5eab\u7ba1\u7406\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\uff0c\u5176\u4e2d\u4e4b\u4e00\u662f <code>ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG<\/code>\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u8a2d\u7f6e\u4e3b\u5f9e\u8907\u88fd\u6642\uff0c\u8868\u793a\u5f9e\u4f3a\u670d\u5668\u7684\u5831\u544a\u5bc6\u78bc\u904e\u9577\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u539f\u56e0\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0-qpCrKPwtRp\">\u932f\u8aa4\u539f\u56e0<\/h2>\n<p>\u7576\u4f60\u5728MySQL\u4e2d\u8a2d\u7f6e\u4e3b\u5f9e\u8907\u88fd\u6642\uff0c\u5f9e\u4f3a\u670d\u5668\u9700\u8981\u4f7f\u7528\u4e00\u500b\u5bc6\u78bc\u4f86\u9a57\u8b49\u8207\u4e3b\u4f3a\u670d\u5668\u7684\u9023\u63a5\u3002\u5982\u679c\u9019\u500b\u5bc6\u78bc\u8d85\u904e\u4e86MySQL\u7684\u9650\u5236\uff0c\u5c31\u6703\u51fa\u73fe <code>ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG<\/code> \u932f\u8aa4\u3002\u6839\u64daMySQL\u7684\u6587\u6a94\uff0c\u5bc6\u78bc\u7684\u6700\u5927\u9577\u5ea6\u70ba32\u5b57\u5143\u3002<\/p>\n<h2 id=\"%e6%aa%a2%e6%9f%a5%e5%af%86%e7%a2%bc%e9%95%b7%e5%ba%a6-qpCrKPwtRp\">\u6aa2\u67e5\u5bc6\u78bc\u9577\u5ea6<\/h2>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u6aa2\u67e5\u4f60\u5728\u8a2d\u7f6e\u5f9e\u4f3a\u670d\u5668\u6642\u6240\u4f7f\u7528\u7684\u5bc6\u78bc\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u6b65\u9a5f\u4f86\u78ba\u8a8d\u5bc6\u78bc\u7684\u9577\u5ea6\uff1a<\/p>\n<pre><code>SHOW VARIABLES LIKE 'max_allowed_packet';\n<\/code><\/pre>\n<p>\u9019\u500b\u547d\u4ee4\u5c07\u986f\u793a\u7576\u524d\u7684\u6700\u5927\u5141\u8a31\u6578\u64da\u5305\u5927\u5c0f\uff0c\u96d6\u7136\u9019\u8207\u5bc6\u78bc\u9577\u5ea6\u7121\u95dc\uff0c\u4f46\u53ef\u4ee5\u5e6b\u52a9\u4f60\u4e86\u89e3\u4f3a\u670d\u5668\u7684\u914d\u7f6e\u3002\u63a5\u4e0b\u4f86\uff0c\u6aa2\u67e5\u4f60\u6240\u4f7f\u7528\u7684\u5bc6\u78bc\uff1a<\/p>\n<pre><code>SELECT LENGTH('your_password_here');\n<\/code><\/pre>\n<p>\u5982\u679c\u8fd4\u56de\u7684\u9577\u5ea6\u8d85\u904e32\u5b57\u5143\uff0c\u4f60\u9700\u8981\u66f4\u6539\u5bc6\u78bc\u3002<\/p>\n<h2 id=\"%e6%9b%b4%e6%94%b9%e5%af%86%e7%a2%bc-qpCrKPwtRp\">\u66f4\u6539\u5bc6\u78bc<\/h2>\n<p>\u8981\u4fee\u5fa9\u9019\u500b\u932f\u8aa4\uff0c\u4f60\u9700\u8981\u5c07\u5f9e\u4f3a\u670d\u5668\u7684\u5831\u544a\u5bc6\u78bc\u66f4\u6539\u70ba\u4e0d\u8d85\u904e32\u5b57\u5143\u7684\u5bc6\u78bc\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u66f4\u6539\u5bc6\u78bc\uff1a<\/p>\n<pre><code>CHANGE MASTER TO MASTER_PASSWORD='new_password';\n<\/code><\/pre>\n<p>\u78ba\u4fdd\u5c07 <code>new_password<\/code> \u66ff\u63db\u70ba\u4e00\u500b\u6709\u6548\u4e14\u4e0d\u8d85\u904e32\u5b57\u5143\u7684\u5bc6\u78bc\u3002\u66f4\u6539\u5f8c\uff0c\u91cd\u65b0\u555f\u52d5\u5f9e\u4f3a\u670d\u5668\u7684\u8907\u88fd\u9032\u7a0b\uff1a<\/p>\n<pre><code>START SLAVE;\n<\/code><\/pre>\n<h2 id=\"%e9%a9%97%e8%ad%89%e4%bf%ae%e5%be%a9-qpCrKPwtRp\">\u9a57\u8b49\u4fee\u5fa9<\/h2>\n<p>\u5728\u66f4\u6539\u5bc6\u78bc\u4e26\u91cd\u65b0\u555f\u52d5\u8907\u88fd\u9032\u7a0b\u5f8c\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u6aa2\u67e5\u5f9e\u4f3a\u670d\u5668\u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>SHOW SLAVE STATUSG\n<\/code><\/pre>\n<p>\u6aa2\u67e5 <code>Slave_IO_Running<\/code> \u548c <code>Slave_SQL_Running<\/code> \u7684\u503c\uff0c\u61c9\u8a72\u90fd\u986f\u793a\u70ba <code>Yes<\/code>\uff0c\u9019\u8868\u793a\u5f9e\u4f3a\u670d\u5668\u5df2\u6210\u529f\u9023\u63a5\u5230\u4e3b\u4f3a\u670d\u5668\uff0c\u4e26\u4e14\u8907\u88fd\u9032\u7a0b\u6b63\u5e38\u904b\u884c\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-qpCrKPwtRp\">\u7e3d\u7d50<\/h2>\n<p>\u5728\u8a2d\u7f6eMySQL\u4e3b\u5f9e\u8907\u88fd\u6642\uff0c\u9047\u5230 <code>ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG<\/code> \u932f\u8aa4\u901a\u5e38\u662f\u56e0\u70ba\u5f9e\u4f3a\u670d\u5668\u7684\u5831\u544a\u5bc6\u78bc\u8d85\u904e\u4e8632\u5b57\u5143\u7684\u9650\u5236\u3002\u901a\u904e\u6aa2\u67e5\u5bc6\u78bc\u9577\u5ea6\u4e26\u5c07\u5176\u66f4\u6539\u70ba\u5408\u9069\u7684\u9577\u5ea6\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u78ba\u4fdd\u5728\u9032\u884c\u4efb\u4f55\u66f4\u6539\u4e4b\u524d\u5099\u4efd\u6578\u64da\uff0c\u4ee5\u9632\u6b62\u6578\u64da\u4e1f\u5931\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6b63\u5728\u5c0b\u627e\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u7528\u6236\u7684\u9700\u6c42\u3002\u7121\u8ad6\u662f\u6578\u64da\u5eab\u7ba1\u7406\u9084\u662f\u7db2\u7ad9\u6258\u7ba1\uff0c\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u4f3a\u670d\u5668<\/a> \u90fd\u80fd\u70ba\u4f60\u63d0\u4f9b\u53ef\u9760\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u4fee\u5fa9MySQL\u932f\u8aa4ER_SYNC_SLAVE_REPORT_PASSWORD_TOO_LONG\uff0c\u78ba\u4fdd\u5f9e\u5c6c\u4f3a\u670d\u5668\u7684\u5bc6\u78bc\u4e0d\u8d85\u904e\u9650\u5236\uff0c\u4fdd\u6301\u6578\u64da\u540c\u6b65\u6b63\u5e38\u904b\u884c\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-176317","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/176317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=176317"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/176317\/revisions"}],"predecessor-version":[{"id":176318,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/176317\/revisions\/176318"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=176317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=176317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=176317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}