I am facing with problem to disable it. I was looking some explanation step by step,but i can't find. Please anyone can help me about this?
Asked
Active
Viewed 2,851 times
0
-
1Don't disable it and write valid SQL queries instead. – sticky bit May 06 '20 at 21:11
-
Sorry you mean to write in SQL right? – Steven Taylor May 06 '20 at 21:21
-
I mean you should write queries that don't violate the rules for aggregations. That way you don't need to disable the setting but have valid queries from a standard SQL (and pretty much every other DBMS than MySQL) point of view. That would be the better solution. – sticky bit May 06 '20 at 21:32
1 Answers
0
You can reset
global variable @@sql_mode
- but you need to be careful not removing other parameters that could be part of it.
Here is one approach:
set global sql_mode = (select replace(@@sql_mode,'ONLY_FULL_GROUP_BY', ''));
Note that disabling this sql mode is usually an indication of bad design in some of your queries. I would not actually recommend doing this; instead, you should put more effort into writing queries that comply to the SQL standard as regard to group by
behavior.

GMB
- 216,147
- 25
- 84
- 135
-
Ok GMB i really appreciate this help.Now please understand me that i am am newbie here,explain me step by step. Now first i must open Phpmyadmin and go to SQL right? – Steven Taylor May 06 '20 at 21:16
-
@StevenTaylor: yes, exactly, you can run this query in the SQL panel of phpmyadmin. – GMB May 06 '20 at 21:20
-
Ok after running this query i got error: Error SQL query: Documentation set global sql_mode = (select replace(@@sql_mode,'ONLY_FULL_GROUP_BY', '')) MySQL said: Documentation #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation – Steven Taylor May 06 '20 at 21:22
-
GMB what you think, why i receive this error that i not have privileges? Or what i must to do to have that privileges? – Steven Taylor May 06 '20 at 21:38
-
@StevenTaylor: yes, that's a permission issue. You can try `set session sql_mode = ...` instead of `set global sql_mode = ...` (you will need to run this command everytime you create a new session). – GMB May 11 '20 at 00:31