Changing max-query-length without Removing MySQL Client in PMM

Hi everyone,

I’m facing an issue with PMM QAN where queries are getting truncated in the “Examples” tab. I found this discussion: Query not showing properly in examples tab in QAN, which suggests setting --max-query-length to -1 to view full queries.

However, I would like to avoid removing and re-adding the MySQL client.

Is there a way to change this parameter without removing and re-adding the MySQL client? For example, by manually editing a configuration file and just restarting the PMM agent?

Any suggestions or experiences would be greatly appreciated.
Thanks in advance!

The agent config is stored inside the pgsql database inside PMM docker container. You’d have to shell into the container, login to pgsql and then update the agents table, then restart the agent. This is not supported; the correct way is to remove the agent, and re-add with proper values. Removing the agent won’t delete any historical data.

1 Like

Thanks, @matthewb, for your answer, I really appreciate it.

I forgot to mention that I’m using MySQL, and my environment is not containerized.

Now I understand that I need to run pmm-admin remove followed by the add command.
Before proceeding, how can I check the current configurations to ensure I don’t miss anything?

Basically, I need to restart my PMM client with the flags --max-query-length=-1 and --table-stats-limit=2000.
I’m using the latest version of PMM 2.