Trouble with GROUP_CONCAT and Longtext in MySQL

According to the MySQL manual, the maximum length of GROUP_CONCAT is defined by the group_concat_max_len system variable, which defaults to 1024.

This value can be increased, by using the following command:

SET group_concat_max_len = <int>

It should be noted, however, that the value of group_concat_max_len is itself limited by the value of another system variable, max_allowed_packet, which defaults to 1,048,576.

This value can be increased to a maximum of 1,073,741,824, using the same syntax:

SET max_allowed_packet = <int>

Leave a Comment