Check your current sql_mode
SELECT @@GLOBAL.sql_mode;
or,
SELECT @@sql_mode;
Edit your my.cnf and remove "ONLY_FULL_GROUP_BY". if you don't have sql_mode, just add sql_mode to .conf. Restart mysql server.
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION