{"id":586,"date":"2026-05-08T09:22:28","date_gmt":"2026-05-08T01:22:28","guid":{"rendered":"https:\/\/lib.kimsor.top\/?p=586"},"modified":"2026-05-08T09:22:28","modified_gmt":"2026-05-08T01:22:28","slug":"%e8%a7%a3%e5%86%b3mysql-the-last-packet-successfully-received-from-the-server-was-xxx-milliseconds-ago-%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/lib.kimsor.top\/?p=586","title":{"rendered":"\u89e3\u51b3Mysql \u2018The last packet successfully received from the server was xxx milliseconds ago\u2018 \u95ee\u9898"},"content":{"rendered":"\n<p><code>springboot<\/code>\u00a0+\u00a0<code>druid<\/code>\u00a0+\u00a0<code>mysql<\/code>\u00a0\u5728\u67e5\u8be2\u67d0\u4e9b\u6bd4\u8f83\u8017\u65f6\u7684sql\u4f1a\u62a5\u9519<\/p>\n\n\n\n<p>\u62a5\u9519\u4fe1\u606f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure\n\nThe last packet successfully received from the server was 10,010 milliseconds ago. The last packet sent successfully to the server was 10,010 milliseconds ago.\n    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)\n    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)\n    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n......<\/code><\/pre>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6cd5\u662f\u5728<code>datasource.url<\/code>\u540e\u9762<code>socketTimeout<\/code>\u53c2\u6570\u914d\u7f6e\uff0c\u8fd9\u91cc\u914d\u7f6e\u4e8630000<\/p>\n\n\n\n<p>\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\ndatasource:\n  driver-class-name: com.mysql.cj.jdbc.Driver\n  url: jdbc:mysql:\/\/localhost:3306\/xxx?xxx&amp;socketTimeout=30000\n  username: \n  password:\n...<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>springboot\u00a0+\u00a0druid\u00a0+\u00a0mysql\u00a0\u5728\u67e5\u8be2\u67d0\u4e9b\u6bd4\u8f83\u8017\u65f6\u7684sql\u4f1a\u62a5\u9519 \u62a5\u9519\u4fe1\u606f\uff1a \u89e3\u51b3\u65b9\u6cd5\u662f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,3],"tags":[],"class_list":["post-586","post","type-post","status-publish","format-standard","hentry","category-mysql","category-database"],"_links":{"self":[{"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/posts\/586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=586"}],"version-history":[{"count":1,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/posts\/586\/revisions"}],"predecessor-version":[{"id":587,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=\/wp\/v2\/posts\/586\/revisions\/587"}],"wp:attachment":[{"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lib.kimsor.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}