Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
程序员文章站
2022-03-23 17:27:57
...
安装了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文件,但是我的数据库安装目录里根本没有这个文件;第二种方案是修改sql_mode,但这不能根本上解决这个问题,重启mysql服务后这个问题又会重复出现。
我的系统是win7,参照第一种方案,修改安装目录里my.ini文件,在[mysqld]后面追加下面这句配置后重启服务解决问题。
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
上一篇: 使用html+css+js实现计算器
下一篇: PHP自定义加密方式
推荐阅读
-
解决大于5.7版本mysql的分组报错Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated
-
解决大于5.7版本mysql的分组报错Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
-
mysql从5.6升级到5.7后出现 Expression #1 of ORDER BY clause is not in SELECT list,this is incompatible with DISTINCT
-
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
-
ERROR 1055 (42000): Expression #3 of SELECT list is not in GROUP BY clause ... 的错误
-
报错 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
-
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains解决
-
idea报错 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre
-
linux上,mysql使用聚合函数group by 时报错:SELECT list is not in GROUP BY clause and contains nonaggre的问题
-
解决大于5.7版本mysql的分组报错Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated