Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

安装了mysql5.7.19后,执行语句中只要含有group by 就会报这个报错:

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
第一种方案是修改my.cnf文件,修改安装目录里my.ini文件,在[mysqld]后面追加下面这句配置后重启服务解决问题

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

 

posted @ 2020-03-10 20:35  small_lei_it  阅读(143)  评论(0编辑  收藏  举报