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_mode
options are enabled.mysql -sse "SELECT @@GLOBAL.sql_mode;"
- Copy the output from the above command.
- Open the
/etc/my.cnf
file in your preferred text editor. - Add
sql-mode=
to the bottom of the[mysqld]
section. - Paste the copied output from above as the
sql-mode
value. - Remove
ONLY_FULL_GROUP_BY
from thesql-mode
value. - Save the changes and exit the text editor.
- Restart MySQL.
/scripts/restartsrv_mysql
- Run the following command to confirm that
ONLY_FULL_GROUP_BY
was removed from the enabledsql_mode
options.mysql -sse "SELECT @@GLOBAL.sql_mode;"
Comments
0 comments
Article is closed for comments.