MYSQL CONCAT MAX LENGTH MYSQL CONCAT MAX LENGTH mysql mysql

MYSQL CONCAT MAX LENGTH


Presumably you're using GROUP_CONCAT(), not simple CONCAT().

The default value of the group_concat_max_len is 1024, which is a pretty small limit if you're building up big long concatenations.

To change it, use this command. I've set the length in this example to 100,000. You could set it to anything you need.

 SET SESSION group_concat_max_len = 100000;

The usual value for max_allowed_packet is one megabyte, which is likely more than you need.

group_concat_max_len itself has an effectively unlimited size. It's limited only by the unsigned word length of the platform: 2^32-1 on a 32-bit platform and 2^64-1 on a 64-bit platform.

If that still isn't enough for your application, it's time to take @eggyal's suggestion and rethink your approach.


You need change group_concat_max_len default value in the bellow config file   **my.cnf file(Linux) and my.ini file(windows)**   [mysqld]//Add this line group_concat_max_len=15000 under mysqld sectiongroup_concat_max_len=15000Note: After change is done You need to restart your MySQL server.   my.cnf file path in linux :    1. /etc/my.cnf   2./etc/mysql/my.cnf   3.$MYSQL_HOME/my.cnf   4.[datadir]/my.cnf   5.~/.my.cnf