With mysql 8.0 the GROUP BY rules got stricter. Is there a way to upgrade to mysql 8.0 without needing to rewrite the queries?
CodePudding user response:
In my.cnf in the section [mysqld] add the following:
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
And restart MySQL. It will permanently disable the ONLY_FULL_GROUP_BY feature of MySQL 8.x
