ORDER BY clause is not in SELECT list

Just like problems with a old passwords you also might encounter the following SQL error when updating your MySQL version:

ERROR 3065 (HY000): Expression #1 of ORDER BY clause is not in SELECT list, references column 'piwigo.piwigo_images.file' which is not in SELECT list; this is incompatible with DISTINCT

The main reasons is: „As of MySQL 5.7.5, the default SQL mode includes ONLY_FULL_GROUP_BY. (Before 5.7.5, MySQL does not detect functional dependency and ONLY_FULL_GROUP_BY is not enabled by default. For a description of pre-5.7.5 behavior, see the MySQL 5.6 Reference Manual.)“ Source: MySQL docs

You have two options to solve this message: start your mysql server with –sql-mode=““ or set sql-mode=““ in /etc/my.cnf

November 24th, 2018