1

I'm using Azure Database for MySql Server, and when running a certain stored procedure, I get this error:

In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'mydatabase.mytable.id'; this is incompatible with sql_mode=only_full_group_by

Now I know why I'm getting it, and I will fix the query, but it's a pretty massive query, and will take some time to do so. For now, as a temporary solution to get my clients working again, I'd like to set only_full_group_by to false. I understand that to set this globally, I need superuser priviledges, so I logged into Azure Portal, went to "Azure Database for MySQL server", went to "Server Parameters" looked for the "sql_mode" parameter, and was going to turn the "only_full_group_by" option off, but I saw it was already off. So I'm not sure why I am still getting the error.

I then tried turning it off for the session:

set session sql_mode='';

but I am STILL getting that error.

Is there no way to turn "only_full_group_by" off in Azure Database for MySql Server?

Thanks

Fabricio Rodriguez
  • 3,769
  • 11
  • 48
  • 101
  • 1
    Why would you turn it off??? Your query is the one that don't make sense. The solution will be to fix your query. – Eric Jul 30 '20 at 23:14
  • I agree, it shouldn't be turned off. But as I explained, it was just a temporary measure until I could fix the enormous query. – Fabricio Rodriguez Jul 31 '20 at 05:33
  • I am getting the same issue. I have disabled GroupBY in Azure, but error still throwing. Annoying. - did you have any luck sorting? – spankymac Feb 03 '22 at 09:03
  • @spankymac to be honest i can't remember. It was about a year and a half ago. I think i never did figure it out, and ended up fixing my sql query :( – Fabricio Rodriguez Feb 04 '22 at 12:25

0 Answers0