{"id":2073,"date":"2023-04-01T21:44:22","date_gmt":"2023-04-01T13:44:22","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=2073"},"modified":"2023-04-06T16:01:06","modified_gmt":"2023-04-06T08:01:06","slug":"mysql-group-concat-length-limit","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/04\/01\/mysql-group-concat-length-limit\/","title":{"rendered":"MySQL group_concat\u957f\u5ea6\u9650\u5236"},"content":{"rendered":"<p>group_concat\u51fd\u6570\u6709\u957f\u5ea6\u9650\u5236<\/p>\n<pre><code class=\"language-sql\">#\u67e5\u627e\u5f53\u524d\u6570\u636e\u5e93\u957f\u5ea6\nshow variables like &#039;group_concat_max_len&#039;<\/code><\/pre>\n<p><!-- more --><\/p>\n<pre><code class=\"language-sql\">#\u8bbe\u7f6e\u5f53\u524dsession\u7684group_concat\u957f\u5ea6\uff0c\u5176\u4ed6session\u8fde\u63a5\u4e0d\u53d7\u5f71\u54cd\nSET SESSION group_concat_max_len = 10240;<\/code><\/pre>\n<pre><code class=\"language-sql\">#\u8bbe\u7f6e\u5168\u5c40group_concat\u957f\u5ea6\nSET GLOBAL group_concat_max_len = 10240<\/code><\/pre>\n<pre><code class=\"language-sql\">SET GLOBAL group_concat_max_len = 10240\n\n[Err] #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation<\/code><\/pre>\n<p>\u5f53\u524dMySQL\u7528\u6237\u4e0d\u5141\u8bb8\uff0c\u8bf7\u8054\u7cfbDBA\u3002<br \/>\nDBA\u53ef\u80fd\u544a\u8bc9\u4f60\uff0c\u957f\u5ea6\u592a\u957f\u4e86\uff0c\u6027\u80fd\u5dee\uff0c\u8fd8\u53ef\u80fd\u6302\u3002\u8fd8\u662f\u5207\u5f00\u6765\u9010\u6761\u8bfb\u5427\u3002<\/p>\n<p>\u4e0eDBA\u534f\u5546\u6539GLOBAL\u53d8\u91cf\u503c\uff0c\u4e0d\u77e5\u9053\u4ec0\u4e48\u65f6\u5019\u88ab\u6539\u4e86\u56de\u6765\uff0cDBA\u8bf4\uff1a\u8fd9\u662f\u6d4b\u8bd5\u5e93\uff0c\u6539\u4e86\u4f1a\u5f71\u54cd\u6240\u6709\u7528\u6237\uff0c\u4e0d\u80fd\u6539\u4e86\u3002\u597d\u5427\u90a3\u53ea\u80fd\u4fee\u6539\u4e1a\u52a1\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-sql\">stmt = conn.createStatement(); \/\/ \u5f53\u524d\u7684JDBC\u8fde\u63a5\nstmt.execute(&quot;set session group_concat_max_len = 10240&quot;);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>group_concat\u51fd\u6570\u6709\u957f\u5ea6\u9650\u5236 #\u67e5\u627e\u5f53\u524d\u6570\u636e\u5e93\u957f\u5ea6 show variables like &#038;#03 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-2073","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2073"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2073\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}