2

I came across a poorly designed MySql table by previous developer where I need to group_concat very long strings. Due to my company’s contract I’m not allowed to alter the design (nor change the query). I’m looking for a way to increase the length of the output. I came across a query with which a length can be set but valid for a single session.

Edit 1: Suggestion provided by Madhur Bhaiya is not persistent, it only holds true for a given session.

nirmeets
  • 33
  • 7

1 Answers1

1

To make changes for a specific session, you can use the following:

SET GLOBAL group_concat_max_len=15000;

Also, to make changes global, you can set the same in MySQL config files. Depending on your server configuration, make the changes in specific mysqld config files. Make sure the setting is under the [mysqld] group header

[mysqld]
group_concat_max_len=15000

After making the changes, you can Restart the MySQL server.

Madhur Bhaiya
  • 28,155
  • 10
  • 49
  • 57
  • as I've mentioned in the question, this holds true only for that session. I'm looking for a persistent solution. – nirmeets Aug 24 '18 at 08:39
  • @nirmeets U can make the persistent change in mysqld config file. I have edited my answer. check. If you could tell me, what is your system configuration, I may find you the specific file location to look at! – Madhur Bhaiya Aug 24 '18 at 10:01