{"id":177983,"date":"2024-11-08T17:13:19","date_gmt":"2024-11-08T09:13:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/177983\/"},"modified":"2024-11-08T17:13:20","modified_gmt":"2024-11-08T09:13:20","slug":"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9mysql%e9%8c%af%e8%aa%a41274-sqlstate-hy000-er_slave_ignored_ssl_params-%e5%9b%a0%e7%82%ba%e8%a9%b2mysql%e5%be%9e%e6%9c%8d%e5%8b%99%e5%99%a8%e6%98%af%e5%9c%a8","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/177983\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9MySQL\u932f\u8aa41274 &#8211; SQLSTATE: HY000 (ER_SLAVE_IGNORED_SSL_PARAMS) \u56e0\u70ba\u8a72MySQL\u5f9e\u670d\u52d9\u5668\u662f\u5728\u6c92\u6709SSL\u652f\u6301\u7684\u60c5\u6cc1\u4e0b\u7de8\u8b6f\u7684\uff0c\u6240\u4ee5CHANGE MASTER\u4e2d\u7684SSL\u53c3\u6578\u88ab\u5ffd\u7565\uff1b\u5982\u679c\u555f\u52d5\u5e36SSL\u7684MySQL\u5f9e\u670d\u52d9\u5668\uff0c\u5b83\u5011\u7a0d\u5f8c\u53ef\u4ee5\u4f7f\u7528"},"content":{"rendered":"<h1 id=\"%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9mysql%e9%8c%af%e8%aa%a41274-sqlstate-hy000-er_slave_ignored_ssl_params-HcjHhQSvmL\">\u5982\u4f55\u4fee\u5fa9MySQL\u932f\u8aa41274 &#8211; SQLSTATE: HY000 (ER_SLAVE_IGNORED_SSL_PARAMS)<\/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\u5c31\u662f\u932f\u8aa4\u4ee3\u78bc1274\uff0c\u8a72\u932f\u8aa4\u901a\u5e38\u8207SSL\uff08\u5b89\u5168\u5957\u63a5\u5b57\u5c64\uff09\u53c3\u6578\u6709\u95dc\u3002\u7576\u4f60\u5728\u5f9e\u670d\u52d9\u5668\u4e0a\u57f7\u884cCHANGE MASTER\u547d\u4ee4\u6642\uff0c\u5982\u679c\u8a72MySQL\u5f9e\u670d\u52d9\u5668\u662f\u5728\u6c92\u6709SSL\u652f\u6301\u7684\u60c5\u6cc1\u4e0b\u7de8\u8b6f\u7684\uff0c\u5247\u6703\u51fa\u73fe\u6b64\u932f\u8aa4\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u8a72\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%e5%88%86%e6%9e%90-HcjHhQSvmL\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>MySQL\u7684\u4e3b\u5f9e\u8907\u88fd\u529f\u80fd\u5141\u8a31\u6578\u64da\u5728\u4e3b\u670d\u52d9\u5668\u548c\u5f9e\u670d\u52d9\u5668\u4e4b\u9593\u9032\u884c\u540c\u6b65\u3002\u7576\u4f60\u5728\u5f9e\u670d\u52d9\u5668\u4e0a\u8a2d\u7f6e\u4e3b\u670d\u52d9\u5668\u7684\u9023\u63a5\u6642\uff0c\u53ef\u80fd\u6703\u4f7f\u7528SSL\u4f86\u52a0\u5bc6\u6578\u64da\u50b3\u8f38\u3002\u7136\u800c\uff0c\u5982\u679c\u5f9e\u670d\u52d9\u5668\u662f\u5728\u6c92\u6709SSL\u652f\u6301\u7684\u60c5\u6cc1\u4e0b\u7de8\u8b6f\u7684\uff0c\u5247\u5728\u57f7\u884cCHANGE MASTER\u547d\u4ee4\u6642\uff0cSSL\u53c3\u6578\u5c07\u88ab\u5ffd\u7565\uff0c\u4e26\u986f\u793a\u932f\u8aa41274\u3002<\/p>\n<p>\u5177\u9ad4\u4f86\u8aaa\uff0c\u932f\u8aa4\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<pre><code>ERROR 1274 (HY000): The SSL parameters were ignored because the MySQL slave was compiled without SSL support<\/code><\/pre>\n<p>\u9019\u610f\u5473\u8457\u5f9e\u670d\u52d9\u5668\u7121\u6cd5\u4f7f\u7528SSL\u9032\u884c\u5b89\u5168\u9023\u63a5\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u6578\u64da\u50b3\u8f38\u904e\u7a0b\u4e2d\u7684\u5b89\u5168\u96b1\u60a3\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-HcjHhQSvmL\">\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u60a8\u6709\u5e7e\u500b\u9078\u64c7\uff1a<\/p>\n<h3 id=\"1-%e9%87%8d%e6%96%b0%e7%b7%a8%e8%ad%afmysql%e5%be%9e%e6%9c%8d%e5%8b%99%e5%99%a8%e4%bb%a5%e6%94%af%e6%8c%81ssl-HcjHhQSvmL\">1. \u91cd\u65b0\u7de8\u8b6fMySQL\u5f9e\u670d\u52d9\u5668\u4ee5\u652f\u6301SSL<\/h3>\n<p>\u6700\u76f4\u63a5\u7684\u89e3\u6c7a\u65b9\u6848\u662f\u91cd\u65b0\u7de8\u8b6fMySQL\u5f9e\u670d\u52d9\u5668\uff0c\u4e26\u78ba\u4fdd\u5728\u7de8\u8b6f\u904e\u7a0b\u4e2d\u555f\u7528SSL\u652f\u6301\u3002\u9019\u901a\u5e38\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li>\u4e0b\u8f09MySQL\u6e90\u4ee3\u78bc\u3002<\/li>\n<li>\u5b89\u88dd\u5fc5\u8981\u7684SSL\u5eab\uff0c\u4f8b\u5982OpenSSL\u3002<\/li>\n<li>\u5728\u914d\u7f6eMySQL\u6642\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u7528SSL\u652f\u6301\uff1a<\/li>\n<\/ul>\n<pre><code>cmake . -DWITH_SSL=system<\/code><\/pre>\n<p>\u5b8c\u6210\u7de8\u8b6f\u5f8c\uff0c\u91cd\u65b0\u555f\u52d5MySQL\u670d\u52d9\u5668\uff0c\u4e26\u6aa2\u67e5SSL\u652f\u6301\u662f\u5426\u5df2\u555f\u7528\u3002<\/p>\n<h3 id=\"2-%e7%a6%81%e7%94%a8ssl%e5%8f%83%e6%95%b8-HcjHhQSvmL\">2. \u7981\u7528SSL\u53c3\u6578<\/h3>\n<p>\u5982\u679c\u60a8\u4e0d\u9700\u8981SSL\u52a0\u5bc6\uff0c\u60a8\u53ef\u4ee5\u9078\u64c7\u5728CHANGE MASTER\u547d\u4ee4\u4e2d\u7981\u7528SSL\u53c3\u6578\u3002\u9019\u6a23\u505a\u7684\u8a71\uff0c\u60a8\u9700\u8981\u78ba\u4fdd\u6578\u64da\u50b3\u8f38\u7684\u5b89\u5168\u6027\u4e0d\u6703\u53d7\u5230\u5f71\u97ff\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u7981\u7528SSL\uff1a<\/p>\n<pre><code>CHANGE MASTER TO MASTER_SSL=0;<\/code><\/pre>\n<p>\u9019\u6a23\uff0cMySQL\u5c07\u4e0d\u6703\u5617\u8a66\u4f7f\u7528SSL\u9032\u884c\u9023\u63a5\uff0c\u5f9e\u800c\u907f\u514d\u932f\u8aa41274\u7684\u51fa\u73fe\u3002<\/p>\n<h3 id=\"3-%e4%bd%bf%e7%94%a8%e6%94%af%e6%8c%81ssl%e7%9a%84mysql%e7%89%88%e6%9c%ac-HcjHhQSvmL\">3. \u4f7f\u7528\u652f\u6301SSL\u7684MySQL\u7248\u672c<\/h3>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u4f7f\u7528\u7684MySQL\u7248\u672c\u4e0d\u652f\u6301SSL\uff0c\u8003\u616e\u5347\u7d1a\u5230\u6700\u65b0\u7248\u672c\u7684MySQL\uff0c\u56e0\u70ba\u65b0\u7248\u672c\u901a\u5e38\u6703\u4fee\u5fa9\u820a\u7248\u672c\u4e2d\u7684\u554f\u984c\u4e26\u589e\u52a0\u65b0\u529f\u80fd\u3002\u78ba\u4fdd\u9078\u64c7\u7684\u7248\u672c\u652f\u6301SSL\uff0c\u4e26\u5728\u5b89\u88dd\u904e\u7a0b\u4e2d\u555f\u7528\u8a72\u529f\u80fd\u3002<\/p>\n<h2 id=\"%e6%aa%a2%e6%9f%a5ssl%e6%94%af%e6%8c%81-HcjHhQSvmL\">\u6aa2\u67e5SSL\u652f\u6301<\/h2>\n<p>\u5728\u9032\u884c\u4e0a\u8ff0\u4efb\u4f55\u66f4\u6539\u5f8c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5MySQL\u662f\u5426\u652f\u6301SSL\uff1a<\/p>\n<pre><code>SHOW VARIABLES LIKE '%ssl%';<\/code><\/pre>\n<p>\u5982\u679cSSL\u652f\u6301\u5df2\u555f\u7528\uff0c\u60a8\u61c9\u8a72\u80fd\u5920\u770b\u5230\u76f8\u95dc\u7684\u8b8a\u91cf\u548c\u8a2d\u7f6e\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-HcjHhQSvmL\">\u7e3d\u7d50<\/h2>\n<p>MySQL\u932f\u8aa41274\u901a\u5e38\u662f\u7531\u65bc\u5f9e\u670d\u52d9\u5668\u672a\u7de8\u8b6fSSL\u652f\u6301\u800c\u5c0e\u81f4\u7684\u3002\u901a\u904e\u91cd\u65b0\u7de8\u8b6fMySQL\u3001\u7981\u7528SSL\u53c3\u6578\u6216\u5347\u7d1a\u5230\u652f\u6301SSL\u7684\u7248\u672c\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\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u5e6b\u52a9\u60a8\u8f15\u9b06\u7ba1\u7406\u6578\u64da\u5eab\u548c\u61c9\u7528\u7a0b\u5e8f\u3002\u7121\u8ad6\u662f\u9700\u8981\u9ad8\u6027\u80fd\u7684 <a href=\"https:\/\/server.hk\">\u4e91\u4f3a\u670d\u5668<\/a> \u9084\u662f\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\uff0c\u6211\u5011\u90fd\u80fd\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4fee\u5fa9MySQL\u932f\u8aa41274 &#8211; SQLSTATE: HY000\uff0c\u56e0\u70ba\u5f9e\u670d\u52d9\u5668\u672a\u555f\u7528SSL\u652f\u6301\uff0c\u9700\u8abf\u6574CHANGE MASTER\u4e2d\u7684SSL\u53c3\u6578\u4ee5\u89e3\u6c7a\u554f\u984c\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-177983","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/177983","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=177983"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/177983\/revisions"}],"predecessor-version":[{"id":177984,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/177983\/revisions\/177984"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=177983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=177983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=177983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}