You're selecting things that are not in your groups, and you need to provide some information about what to do with those. Which means an aggregation function - max, min, count, etc...
What @pascal.fragnoud said. If your SQL is set to sql_mode=only_full_group_by then every column that is not using an aggregate function has to in your GROUP BY clause.
Seems that you may have already seen this thread though given your attempt to try to change the sql mode. I would just fix the query though instead of changing the mode. It may be a little annoying and more verbose but it will also be more explicit about what is being done. If you truly don't care about what the value of a certain column is in when grouped, there is the ANY_VALUE() function.
Generally, using any * wildcard in a SELECT list is fundamentally incompatible with GROUP BY. Grouping requires explicit grouping output columns and aggregate output columns, and nothing else, in every SQL dialect I know.