Danyal Sandeelo Danyal Sandeelo - 1 year ago 75
MySQL Question

group_concat_max_len value gets changed to default on restart

I am changing the value of group_concat_max_len to 15000 using

SET group_concat_max_len=15000;

I achieve what I what but when I restart mysql server, it is set to default 1024.

How can I make it static to 15000, I assume, I should be able to set this value in mysql config file. I added
in my.cnf and restarted the server. The value remained same i.e 1024.

Can I set it in a way so that the value remains same when mysql server is restarted?


Yes. You need to put it in the config file :

LINUX: my.cnf file

WINDOWS: my.ini file


Note: Add this line group_concat_max_len=15000 under mysqld section. You need to restart your MySQL server to see the effect.