“Hey, what’s going on with my applications? I installed a
newer version of MySQL. I have queries that perfectly run with
the older version and now I have a lot of errors.”
This is a question some customers have asked me after upgrading
MySQL. In this article, we’ll see what one of the most frequent
causes of this issue is, and how to solve it.
We are talking about this error:
ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause
and contains nonaggregated column 'test.web_log.user_id' which is not functionally
dependent on columns in GROUP BY clause; this is incompatible
with sql_mode=only_full_group_by
Have you ever seen it?
SQL_MODE
As the first thing let me introduce the concept of
SQL_MODE.
MySQL can work using different SQL modes that affect the syntax
of the queries and validation checks. Based on the configured
value of the …
[Read more]