{"id":200974,"date":"2025-05-06T14:08:51","date_gmt":"2025-05-06T06:08:51","guid":{"rendered":"https:\/\/server.hk\/cnblog\/200974\/"},"modified":"2025-05-06T14:08:51","modified_gmt":"2025-05-06T06:08:51","slug":"%e8%ae%ba%e5%9d%9b%e7%bd%91%e9%a1%b5%e8%bf%90%e8%a1%8c%e5%bc%82%e5%b8%b8%ef%bc%8c%e5%86%85%e9%83%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%94%99%e8%af%af%ef%bc%8c%e5%a6%82%e4%bd%95%e6%8e%92%e6%9f%a5%e5%8e%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/200974\/","title":{"rendered":"\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\uff0c\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u539f\u56e0\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\uff0c\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u539f\u56e0\uff1f<\/h1>\n<p>\u5728\u6570\u636e\u5e93\u5b9e\u6218\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u4e00\u4e9b\u8fd9\u6837\u90a3\u6837\u7684\u95ee\u9898\uff0c\u7136\u540e\u8981\u5361\u597d\u534a\u5929\uff0c\u7b49\u95ee\u9898\u89e3\u51b3\u4e86\u624d\u53d1\u73b0\u539f\u6765\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u662f\u6ca1\u6709\u638c\u63e1\u597d\u3002\u4eca\u5929\u4e3b\u673a\u5b9d\u8d1d\u5c31\u6574\u7406\u5206\u4eab\u300a\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\uff0c\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u539f\u56e0\uff1f\u300b\uff0c\u804a\u804a\uff0c\u5e0c\u671b\u53ef\u4ee5\u5e2e\u52a9\u5230\u6b63\u5728\u52aa\u529b\u8d5a\u94b1\u7684\u4f60\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241123\/17323614526741bcec76835.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\u7684\u539f\u56e0\u5206\u6790<\/strong><\/p>\n<p>\u7528\u6237\u53cd\u6620\u5176\u5f00\u53d1\u7684\u8bba\u575b\u5728\u7f51\u9875\u4e0a\u8fd0\u884c\u65f6\u51fa\u73b0\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\uff0c\u9875\u9762\u663e\u793a\u201corg.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL\u201d\u5f02\u5e38\u3002<\/p>\n<p><strong>\u53ef\u80fd\u7684\u9519\u8bef\u539f\u56e0\uff1a<\/strong><\/p>\n<p><strong>1. \u6570\u636e\u5e93\u8fde\u63a5\u95ee\u9898<\/strong><\/p>\n<p>\u9519\u8bef\u4fe1\u606f\u4e2d\u63d0\u5230\u201cCannot open connection\u201d\uff0c\u8868\u660e\u8be5\u8bba\u575b\u65e0\u6cd5\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u5e94\u68c0\u67e5\u6570\u636e\u5e93\u914d\u7f6e\uff0c\u786e\u4fdd\u6570\u636e\u5e93\u540d\u79f0\u3001\u4e3b\u673a\u3001\u7aef\u53e3\u3001\u7528\u6237\u540d\u548c\u5bc6\u7801\u6b63\u786e\u3002\u540c\u65f6\uff0c\u786e\u8ba4\u9632\u706b\u5899\u662f\u5426\u5141\u8bb8\u8bba\u575b\u8bbf\u95ee\u6570\u636e\u5e93\u3002<\/p>\n<p><strong>2. \u7f16\u7801\u95ee\u9898<\/strong><\/p>\n<p>\u9519\u8bef\u4fe1\u606f\u4e5f\u63d0\u5230\u4e86\u201cUnknown initial character set index &#8216;255&#8217; received from server\u201d\uff0c\u8fd9\u8868\u660e\u8bba\u575b\u548c\u6570\u636e\u5e93\u4e4b\u95f4\u7684\u5b57\u7b26\u7f16\u7801\u4e0d\u5339\u914d\u3002\u53ef\u4ee5\u68c0\u67e5\u6570\u636e\u5e93\u914d\u7f6e\uff0c\u786e\u4fdd\u5b57\u7b26\u7f16\u7801\u4e0e\u8bba\u575b\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801\u4e00\u81f4\u3002<\/p>\n<p>\u4eca\u5929\u5173\u4e8e\u300a\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\uff0c\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u539f\u56e0\uff1f\u300b\u7684\u5185\u5bb9\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\uff0c\u5982\u679c\u6709\u4ec0\u4e48\u7591\u95ee\u6216\u8005\u5efa\u8bae\uff0c\u53ef\u4ee5\u5728\u4e3b\u673a\u5b9d\u8d1d\u516c\u4f17\u53f7\u4e0b\u591a\u591a\u56de\u590d\u4ea4\u6d41\uff1b\u6587\u4e2d\u82e5\u6709\u4e0d\u6b63\u4e4b\u5904\uff0c\u4e5f\u5e0c\u671b\u56de\u590d\u7559\u8a00\u4ee5\u544a\u77e5\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u8bba\u575b\u7f51\u9875\u8fd0\u884c\u5f02\u5e38\uff0c\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-200974","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/200974","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"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=200974"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/200974\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=200974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=200974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=200974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}