mysql使用group by 异常on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
临时解决
SET @@global.sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
重新后还会出现
修改MySQL配置文件
Linux下my.cnf或Windows下My.ini
注意在[mysqld]段下添加以下代码:
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION