Enable set global only_full_group_by Permanently

Hi,

I have added the SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); to enable the mode by launching the Lish console.

The issue i am facing is the server goes back to the disabled mode every two days or three days and due to that errors are seen at the site.

Any option to enable that permanently so that even the server restarts it will not change.

I read here https://www.linode.com/community/questions/18925/how-can-i-enabledisable-only_full_group_by-in-mysql that edit etc/my.chf

But i was not able to locate the etc/my.chf

how can i access that file and from where.

If accessible from cpanel or WHM please advise that also.

1 Reply

It's likely that the MySQL configuration is still set to enforce group by. The file you're looking for is /etc/my.cnf (.cnf rather than .chf). If you're having trouble searching for it, I'd suggest listing out the contents of the /etc directory to find the file. You can cd /etc then ls -la to list the contents of the directory and locate my.cnf.

If the configuration file isn't updated, it can cause the change to ONLY_FULL_GROUP_BY to revert back to the default setting, which lines up with the issue you're experiencing. I don't believe you can edit this file via cPanel; cPanel recommends making the change via SSH instead.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct