How to remove ONLY_FULL_GROUP_BY using mysql terminal
When you are running a multiple PHP applications around the same Database you might get the error as "ONLY_FULL_GROUP_BY" sql_mode is enabled which results in not rendering the block. Here is a quick fix for such scenarios.
- Get all the available sql_mode using mysql terminal
-
show variables like "sql_mode";
-
- Now, update and remove the ONLY_FULL_GROUP_BY sql mode
-
SET sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-
- Now, validate the changes by fetching the sql_mode
-
show variables like "sql_mode";
-
NOTE : mysql server restart is not required in this case.
Published on