{"id":876,"date":"2025-07-19T22:56:59","date_gmt":"2025-07-19T14:56:59","guid":{"rendered":"http:\/\/www.cmd137blog.top\/?p=876"},"modified":"2025-09-24T22:58:49","modified_gmt":"2025-09-24T14:58:49","slug":"%e8%87%aa%e5%8a%a8%e5%8c%96%e5%bc%80%e5%90%af%e8%84%9a%e6%9c%ac%e4%bb%a5%e5%8f%8a-allowpublickeyretrievaltrue-%e9%97%ae%e9%a2%98%e3%80%82","status":"publish","type":"post","link":"http:\/\/www.cmd137blog.top\/?p=876","title":{"rendered":"\u81ea\u52a8\u5316\u5f00\u542f\u811a\u672c\u4ee5\u53ca allowPublicKeyRetrieval=true \u95ee\u9898\u3002"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u81ea\u52a8\u5316\u811a\u672c\uff1a<\/h1>\n\n\n\n<p>\u7531\u4e8e\u4e48\u6bcf\u6b21\u5728\u5b66\u4e60\u9ed1\u9a6c\u70b9\u8bc4\u65f6\u90fd\u5f97\u5230\u5404\u4e2a\u5730\u65b9\u5f00\u542f\u5404\u79cd\u8f6f\u4ef6\uff0c\u70e6\u3002\u6240\u4ee5\u6709\u4e86\u4ee5\u4e0b\u811a\u672c\uff1a<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@echo off\ntitle \u4e00\u952e\u542f\u52a8\u5f00\u53d1\u73af\u5883\necho \u6b63\u5728\u542f\u52a8\u5f00\u53d1\u73af\u5883\u7ec4\u4ef6\uff0c\u8bf7\u7a0d\u5019...\n\n:: \u542f\u52a8 MySQL \u670d\u52a1\uff08\u524d\u63d0\u662f\u5df2\u7ecf\u4ee5\u670d\u52a1\u65b9\u5f0f\u5b89\u88c5\uff09\necho \u542f\u52a8 MySQL...\nnet start MySQL80\n\n:: \u542f\u52a8 Redis\necho \u542f\u52a8 Redis...\nstart \"\" \"D:\\develop\\Redis-x64-3.2.100\\redis-server.exe\" \"D:\\develop\\Redis-x64-3.2.100\\redis.windows.conf\"\n\n:: \u542f\u52a8 Nginx\necho \u542f\u52a8 Nginx...\ncd \/d \"D:\\My Java Code\\nginx-hmdp\"\nstart \"\" nginx.exe -c \"D:\\My Java Code\\nginx-hmdp\\conf\\nginx.conf\"\n\n\n:: \u542f\u52a8 IDEA\necho \u542f\u52a8 IntelliJ IDEA...\nstart \"\" \"C:\\Program Files\\JetBrains\\IntelliJ IDEA 2023.3.2\\bin\\idea64.exe\"\n\necho \u6240\u6709\u670d\u52a1\u5df2\u5c1d\u8bd5\u542f\u52a8\uff0c\u8bf7\u68c0\u67e5\u7ec8\u7aef\u7a97\u53e3\u8f93\u51fa\u662f\u5426\u6709\u9519\u8bef\u3002\npause<\/code><\/pre>\n\n\n\n<p>\u800c\u5728\u8be5\u8fc7\u7a0b\u4e2d\u89e3\u51b3\u4e86\u4e00\u4e2a\u4e4b\u524d\u4e00\u76f4\u7406\u89e3\u9519\u8bef\u7684\u95ee\u9898\uff0c\u6709\u5173mysql\u8fde\u63a5\u4e0eallowPublicKeyRetrieval=true\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001mysql\u4e0eallowPublicKeyRetrieval=true<\/h1>\n\n\n\n<p>\u5728\u4e4b\u524d\u5b66\u4e60\u8fc7\u7a0b\u4e2d\uff0c\u6bcf\u6b21\u8fd0\u884c\u9879\u76ee\u524d\u7aef->\u540e\u7aef->mysql\u8fd9\u6837\u8bf7\u6c42\u6570\u636e\u65f6\uff0c\u90fd\u62a5mysql\u76f8\u5173\u9519\u8bef\uff1a<br>\u201ccom.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed\u201d\u3002<br>\u800c\u6211\u4e4b\u524d\u4e00\u76f4\u6ca1\u6709\u7ec6\u770b\uff0c\u8ba4\u4e3a\u662f\u6ca1\u6709\u5f00\u542fmysql\u6570\u636e\u5e93\u3002\u800c\u6211\u4e4b\u524d\u4e00\u76f4\u8ba4\u4e3a\u4f7f\u7528datagrip\u5c31\u4f1a\u987a\u53d8\u5f00\u542f\u6570\u636e\u5e93\uff08\u5b9e\u9645\u4e0d\u4f1a\u5f00\u542f\uff0cdatagrip\u53ea\u4f1a\u8fde\u63a5\u3002\u800c\u53ea\u8981\u4f7f\u7528\u8fc7datagrip\u67e5\u8fc7\u8868\uff0c\u4e0a\u8ff0\u9519\u8bef\u5c31\u4f1a\u89e3\u51b3\uff09\u3002<strong>\u5b9e\u9645\u662fJDBC \u9a71\u52a8\u7248\u672c \u4e0e MySQL 8.0+ \u9ed8\u8ba4\u8ba4\u8bc1\u65b9\u5f0f\u4e0d\u517c\u5bb9 \u7684\u95ee\u9898\u3002<\/strong><\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a\u52a0\u4e0aallowPublicKeyRetrieval=true<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    #url: jdbc:mysql:\/\/127.0.0.1:3306\/hmdp?useSSL=false&amp;serverTimezone=UTC\n    url: jdbc:mysql:\/\/127.0.0.1:3306\/hmdp?useSSL=false&amp;serverTimezone=UTC&amp;allowPublicKeyRetrieval=true<\/code><\/pre>\n\n\n\n<p>\u53e6\u5916\uff0c\u9700\u8981\u6ce8\u610fallowPublicKeyRetrieval=true\u5e26\u6765\u7684\u5b89\u5168\u95ee\u9898\uff0c\u4e00\u822c\u6765\u8bf4\u53ea\u8981\u4e0d\u5c06mysql\u7aef\u53e3\u66b4\u9732\u5c31\u6ca1\u4e8b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u81ea\u52a8\u5316\u811a\u672c\uff1a \u7531\u4e8e\u4e48\u6bcf\u6b21\u5728\u5b66\u4e60\u9ed1\u9a6c\u70b9\u8bc4\u65f6\u90fd\u5f97\u5230\u5404\u4e2a\u5730\u65b9\u5f00\u542f\u5404\u79cd\u8f6f\u4ef6\uff0c\u70e6\u3002\u6240\u4ee5\u6709\u4e86\u4ee5\u4e0b\u811a\u672c\uff1a \u800c\u5728\u8be5\u8fc7\u7a0b\u4e2d\u89e3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79,66],"tags":[],"class_list":["post-876","post","type-post","status-publish","format-standard","hentry","category-bug","category-66"],"_links":{"self":[{"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/posts\/876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=876"}],"version-history":[{"count":2,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/posts\/876\/revisions"}],"predecessor-version":[{"id":878,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=\/wp\/v2\/posts\/876\/revisions\/878"}],"wp:attachment":[{"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=876"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cmd137blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}