Fixing MySQL 5.7 troubles

Many hosters are now updating their machines to use MySQL 5.7. A minor update doesn’t sound that bad, unfortunately one small change in MySQL’s default config can cause major headaches and late night patching parties.

If you want to know more about it WMK wrote a blog post about it. That can be found here:
http://www.silverstrip.es/blog/fixing-mysql-5-7-troubles-easily/

If you just need a quick fix sunnysideup shared a solution for SS4 here:

Lukas Erni created a composer patch for SilverStripe3 GitHub - lerni/silverstripe3-mysql57-fluent: [PATCH] A patch for SilverStripe to mimic the MySQL-Mode ANSI as with MySQL <5.7.x (remove ONLY_FULL_GROUP_BY) you can add to your composer.json.

2 Likes

Starting from CMS 4.7.0, this is now possible via a core API: https://docs.silverstripe.org/en/4/changelogs/4.7.0/#mysql-connection-mode-now-configurable

More context on fixing the root cause of the issue in your code (rather than removing ONLY_FULL_GROUP_BY) can be found in Test failure in MySQL 5.7 · Issue #5451 · silverstripe/silverstripe-framework · GitHub