I have MySQL installed on an Ubuntu machine.
I added this line in /etc/mysql/my.cnf
group_concat_max_len=15360
But there is no effect. Every time I restart mysql, the value is set to 1,024. I have to manually run
SET GLOBAL group_concat_max_len=15360
...every time I start up mysql.
Why is my.cnf not working the way I thought it should? Thank you
If you have the setting already in my.cnf or my.cfg, and a restart did not bring about the change you expected, you may just have the setting placed in the wrong location.
Make sure the setting is under the [mysqld] group header
then you can restart mysqld without worry
BTW @gbn may be more correct in this instance because you cannot use commas in the numerical settings for my.cnf (+1 for @gbn)
Use
group_concat_max_len=15360
without the thousands separatorSee the docs
If this doesn't persist, then you need to identify the correct my.cnf or my.cfg used by your installation
Here is what I do:
Open MySQL Workbench and select the connection you want to manipulate if you have more than one, then click Server Administration - Advanced - Various, select group_concat_max_len and set your long desired value.
Remember to restart MySql.
Kind regards, Ola Balstad.