MySql

永久设置group_concat_max_len(MySQL配置),MYSQL中group_concat有长度限制!默认1024


查找当前数据库长度

show variables like 'group_concat_max_len' ;

设置当前session的group_concat长度,其他session连接不受影响

SET SESSION group_concat_max_len = 10240;

设置全局group_concat长度

SET GLOBAL group_concat_max_len = 10240;

永久设置group_concat长度,需要修改my.cnf或my.ini文件,在文件中找到[mysqld] 在后面添加group_concat_max_len=102400,保存之后然后重启mysql即可

[mysqld]
...
group_concat_max_len=102400
...

 

还没有评论哦,快来抢沙发吧!