I have MySQL installed on an Ubuntu machine.

I added this line in /etc/mysql/my.cnf


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

  • This always happens. It's either 1) wrong file, or 2) something else below had overrwritten it. – Pacerier Apr 18 '15 at 12:59
  • 1
    @Pacerier or the directive was added under the wrong group header, as in the accepted answer. – Buttle Butkus Apr 30 '15 at 19:02

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)

  • I spent hours debugging before I realized my group_concat_max_len was reset. Now I will not have to worry about that happening again. Thanks so much. There was no setting for group_concat_max_len by default in my.cnf, so I just added it to the bottom, under [isamchk]. OOPS. Thanks so much! – Buttle Butkus Jan 6 '12 at 11:01
  • It bugs me so much that some settings use dashes and some use underscores in the MySQL config – Brian Leishman Jul 3 '17 at 20:31

Use group_concat_max_len=15360 without the thousands separator

See the docs

If this doesn't persist, then you need to identify the correct my.cnf or my.cfg used by your installation

  • Thanks for your comment. Unfortunately, it was my mistake putting the ',' in my question but not in the my.cnf. Rolando actually was right. I had no idea that the location for group_concat_max_len mattered in my.cnf. – Buttle Butkus Jan 6 '12 at 10:59

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.

  • 1
    That's not setting a permanent setting. – Dennis Kaarsemaker Mar 23 '13 at 10:24
  • It is permanent!!! Please check before you comment. – Ola Balstad Mar 24 '13 at 4:55
  • What is mysql workbench? It sounds like your answer applies only to a particular API for MySQL. That's probably why you're getting downvoted. (I didn't downvote you, by the way) – Buttle Butkus Mar 25 '13 at 2:10
  • MySql Workbench is a useful API tool that comes with the MySQL Community Server when you download it, i.e with the latest version 5.6 – Ola Balstad Mar 25 '13 at 7:12
  • NB!! Do not get discouraged by my rating. This is a quick and good solution to a common problem. – Ola Balstad Mar 26 '13 at 8:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.