1055 - Expression #16 of SELECT list is not in GROUP BY clause and contains nonaggregated column 报错处理

源码想移植到新的机器,MySQL 使用PHPStudy 安装 升级到5.7.26 。
一切准备就绪但是,出现以上错误。

话不多说解决办法,

1、主要原因
Mysql默认
的 sql_mode 默认 ONLY_FULL_GROUP_BY 值,需要把它去掉。

2 去掉办法
尝试很多种办法,比如
MySQL>set @@global.sql_mode=(select replace(@@global.sql_mode,’ ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’,’’));
都无法去掉。
3 正确办法 windows 系统里,
编辑MySQL 安装目录里的 my.ini
增加一行
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
(只要把ONLY_FULL_GROUP_BY 去掉即可)

保存后,重启Mysql 问题解决。
————————————————
版权声明:本文为CSDN博主「noya202020」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/noya202020/article/details/119413241

GROUP BY clause and contains nonaggregated 报错处理的更多相关文章

  1. 【mybatis】【mysql】mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains no ...

  2. 解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat

    解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat ...

  3. 解决mysql报错:- Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'

    mysql执行报错: - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c ...

  4. MySQL5.7.27报错[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

    mysql5.7.27在运行更新语句时出现如下情况,mysql5.6之前没有这种情况出现. of ORDER BY clause is not in GROUP BY clause and conta ...

  5. mysql 5.7 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ...报错

    使用mysql在执行一条插入语句时 , ', "hhh"); 报错:Expression #1 of ORDER BY clause is not in GROUP BY clau ...

  6. MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'rpa ...

  7. SELECT list is not in GROUP BY clause and contains nonaggregated column

    报错如下: Expression # of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘sss.m ...

  8. 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 GRO ...

  9. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functi

    sql报错: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT ...

  10. mysql 8.0下的SELECT list is not in GROUP BY clause and contains nonaggregated column

    mysql的版本 mysql> select version();+-----------+| version() |+-----------+| 8.0.12 |+-----------+ 在 ...

随机推荐

  1. Matplotlib绘图设置---坐标轴刻度和标签设置

    每个axes对象都有xaxis和yaxis属性,且xaxis和yaxis的每一个坐标轴都有主要刻度线/标签和次要刻度线/标签组成,标签位置通过一个Locator对象设置,标签格式通过一个Formatt ...

  2. BI小白收藏|一文告诉你什么是商务智能

    近年来,商务智能(BI)已成为继企业资源计划之后企业信息化建设的热点领域,在国内发展迅速.利用商务智能可以为企业整合集成现有的业务数据,在深度挖掘分析的基础上为管理决策者提供决策辅助,提高科学决策水平 ...

  3. Bash与shell的区别

    Bash 与 shell 的区别 介绍 常见的 shell 解释器有 sh.bash 这两种,其他的 ksh.csh 和 zsh 等是不常见的.Mac OS 中默认安装了以上所有类型,Windows ...

  4. 使用Helm部署Wikijs

    使用 Helm 部署 Wiki.js ️ 参考文档: Wiki.js 官方文档 - 安装 - Kubernetes Wiki.js 使用 Helm 安装 Wiki.js 官方文档 - 安装 - 侧加载 ...

  5. 大型场景中通过监督视图贡献加权进行多视图人物检测 Multi-View People Detection in Large Scenes via Supervised View-Wise Contribution Weighting

    Multi-View People Detection in Large Scenes via Supervised View-Wise Contribution Weighting 大型场景中通过监 ...

  6. 第十八篇:Django进级

    一.Django工程创建 二.Django 的 CBV和FBV 三.模板语言循环字典 四.Django基于正则表达式的URL 五.Django对应的路由名称 六.Django路由分发 七.Django ...

  7. c# aspose操作word文档

    背景 这个是一个操作word文档的插件 1.1插入图片 using Aspose.Words; using Aspose.Words.Drawing; using Aspose.Words.Rende ...

  8. 重新整理数据结构与算法(c#)——算法套路普利姆算法[二十九]

    前言 看一个题目: 这个问题就是求最小生成树,是图转换为树的一种方式. 最小生成树概念: 最小生成树简称MST. 1.n个顶点,一定有n-1条边 2.包含全部顶点. 3.图转换为最小生成树,权重之和最 ...

  9. C#判断窗体是否被遮挡 - 开源研究系列文章

    上次发布了托盘窗体的显示与隐藏的博文:,但是在测试窗体最大化的时候发现窗体没有隐藏,调试了下知道是窗体是否被遮挡这个函数的判断有问题.于是就研究了该代码,然后联系了该操作类的作者,也是博客园的园友,然 ...

  10. java中jar文件

    1.文档性质的jar文件 可以将有包名的类的字节码文件压缩成一个jar文件,供其他源文件用import语句导入jar文件中的类. 以下结合具体的两个类给出生成的jar文件的步骤eg23中TestTwo ...