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

 

你可能感兴趣的:(Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column)