﻿{"id":152,"date":"2013-09-17T17:04:25","date_gmt":"2013-09-17T09:04:25","guid":{"rendered":"http:\/\/blog.sway.com.cn\/?p=152"},"modified":"2013-09-17T17:04:25","modified_gmt":"2013-09-17T09:04:25","slug":"mysql-got-a-packet-bigger-than-max_allowed_packet-bytes-%e9%94%99%e8%af%af%e5%8e%9f%e5%9b%a0%e5%8f%8a%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/blog.sway.com.cn\/?p=152","title":{"rendered":"mysql Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes \u9519\u8bef\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>Mysql 5.1 \u9047\u5230\u7684\u4fe1\u606f\u5305\u8fc7\u5927\u95ee\u9898 \u7528\u5ba2\u6237\u7aef\u5bfc\u5165\u6570\u636e\u7684\u65f6\u5019\uff0c\u9047\u5230\u00a0<strong>\u9519\u8bef\u4ee3\u7801: 1153 &#8211; Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes<\/strong>\u00a0\u7ec8\u6b62\u4e86\u6570\u636e\u5bfc\u5165\u3002<\/p>\n<p>\u5f53MySQL\u5ba2\u6237\u7aef\u6216mysqld\u670d\u52a1\u5668\u6536\u5230\u5927\u4e8emax_allowed_packet\u5b57\u8282\u7684\u4fe1\u606f\u5305\u65f6\uff0c\u5c06\u53d1\u51fa\u201c\u4fe1\u606f\u5305\u8fc7\u5927\u201d\u9519\u8bef\uff0c\u5e76\u5173\u95ed\u8fde\u63a5\u3002\u5bf9\u4e8e\u67d0\u4e9b\u5ba2\u6237\u7aef\uff0c\u5982\u679c\u901a\u4fe1\u4fe1\u606f\u5305\u8fc7\u5927\uff0c\u5728\u6267\u884c\u67e5\u8be2\u671f\u95f4\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u201c\u4e22\u5931\u4e0eMySQL\u670d\u52a1\u5668\u7684\u8fde\u63a5\u201d\u9519\u8bef\u3002<\/p>\n<p>\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u5747\u6709\u81ea\u5df1\u7684max_allowed_packet\u53d8\u91cf\uff0c\u56e0\u6b64\uff0c\u5982\u4f60\u6253\u7b97\u5904\u7406\u5927\u7684\u4fe1\u606f\u5305\uff0c\u5fc5\u987b\u589e\u52a0\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e0a\u7684\u8be5\u53d8\u91cf\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u670d\u52a1\u5668\u9ed8\u8ba4max-allowed-packet\u4e3a1MB<\/p>\n<p>\u5982\u679c\u4f60\u6b63\u5728\u4f7f\u7528mysql\u5ba2\u6237\u7aef\u7a0b\u5e8f\uff0c\u5176max_allowed_packet\u53d8\u91cf\u7684\u9ed8\u8ba4\u503c\u4e3a16MB\u3002\u8981\u60f3\u8bbe\u7f6e\u8f83\u5927\u7684\u503c\uff0c\u53ef\u7528\u4e0b\u8ff0\u65b9\u5f0f\u542f\u52a8mysql<\/p>\n<p>mysql&gt;mysql &#8211;max-allowed-packet=32M<\/p>\n<p>\u5728my.ini\u4e5f\u53ef\u4ee5\u66f4\u6539\uff0c\u9700\u8981\u91cd\u65b0\u542f\u52a8mysql<\/p>\n<p>\u5728my.ini\u52a0\u5165[mysql]max_allowed_packet=32M<\/p>\n<p>\u5f53\u7136\u5c3d\u91cf\u907f\u514d\u5982\u6b64\u5927\u7684\u6570\u636e\u5305\uff0c\u624d\u662f\u6cbb\u672c\u4e4b\u9053\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mysql 5.1 \u9047\u5230\u7684\u4fe1\u606f\u5305\u8fc7\u5927\u95ee\u9898 \u7528\u5ba2\u6237\u7aef\u5bfc\u5165\u6570\u636e\u7684\u65f6\u5019\uff0c\u9047\u5230\u00a0\u9519\u8bef\u4ee3\u7801: 1153 &#8211;  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":1,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":153,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/153"}],"wp:attachment":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}