MySQL分组查询报错 Syntax error or access violation: 1055 问题
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1
of SELECT list is not in GROUP BY clause and contains nonaggregated
column ‘stu_jifen.r.id’ which is not functionally dependent on columns
in GROUP BY clause; this is incompatible with
sql_mode=only_full_group_by
1、解决方法
找到 MySQL
配置文件 my.cnf
大约在图示位置添加一个配置:sql_mode=""
重启 MySQL
服务即可。