So I recently upgraded to MySQL 5.7.12 before embarking on a new website build using CraftCMS (which, by the way, is a great bit of kit). I’ve never had a problem installing CraftCMS before, but the install kept failing afer installing version 5.7.12 of MySQL.
It turns out the the behaviour of ‘GROUP BY’ has been changed in this newer version of MySQL (to become SQL:1999 compliant). This causes some of the database queries that the install scripts use to fail.
Two options: 1) downgrade MySQL to an earlier version or 2) make an edit to my.cnf
I use Homebrew on my Mac meaning that when MySQL installed there is a default my.cnf file stored at:
You need to copy this file to…
…and then rename it to my.cnf
The quick way to do this is to type…
…into your terminal and hit enter.
Once this is done, you then need to edit the newly created my.cnf file by adding the following…
Save the file and then restart mysql. With homebrew, I just run…
And voila, CraftCMS installation will now work.
The guys at Craft say that the up and coming Craft3 already has a fix included within it so this problem will eventually be non-existent. But as Craft 3 is not yet production-ready, those of you that want to use Craft 2.6* and MySQL 5.7.12 (or later) can use the above work around.
In terminal run:
CTRL + X, y, Enter
Retry craft install.