Introduction
This article provides the procedure to disable ONLY_FULL_GROUP_BY in MySQL.
Please note that ONLY_FULL_GROUP_BY cannot be disabled for a single account or database.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command to determine which
sql_modeoptions are enabled.mysql -sse "SELECT @@GLOBAL.sql_mode;"
- Copy the output from the above command.
- Open the
/etc/my.cnffile in your preferred text editor. - Add
sql-mode=to the bottom of the[mysqld]section. - Paste the copied output from above as the
sql-modevalue. - Remove
ONLY_FULL_GROUP_BYfrom thesql-modevalue. - Save the changes and exit the text editor.
- Restart MySQL.
/scripts/restartsrv_mysql
- Run the following command to confirm that
ONLY_FULL_GROUP_BYwas removed from the enabledsql_modeoptions.mysql -sse "SELECT @@GLOBAL.sql_mode;"
Comments
0 comments
Article is closed for comments.