当前位置:Gxlcms > 数据库问题 > MySQL中使用group_concat遇到的坑

MySQL中使用group_concat遇到的坑

时间:2021-07-01 10:21:17 帮助过:1人阅读

group_concat_max_len;

 

修改group_concat_max_len大小:

方法一:

SET GLOBAL group_concat_max_len = 1024 * 10;
SET SESSION group_concat_max_len = 1024 * 10;

这种方法可以在不重启服务器的情况下使用,但是如果重启服务器后会还原配置。可以通过修改MySQL(my.ini)配置文件来彻底解决这个问题。

 

方法二:

修改MySQL(my.ini)配置文件,需要重启服务器后才能生效。

找到my.ini文件,如果修改或新增:

group_concat_max_len = 10240

重启生效。

 

MySQL中使用group_concat遇到的坑

标签:pre   查询   concat   长度   variable   oba   修改   nbsp   不重启   

人气教程排行