GROUP BY clause and contains nonaggregated 报错处理
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 报错处理的更多相关文章
- 【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 ...
- 解决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 ...
- 解决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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- mysql 8.0下的SELECT list is not in GROUP BY clause and contains nonaggregated column
mysql的版本 mysql> select version();+-----------+| version() |+-----------+| 8.0.12 |+-----------+ 在 ...
随机推荐
- django项目部署到centos
服务器是使用的阿里云的centos 7.6 项目使用的是 Python3.9.5 + Django 3.2.4 目标:将django项目部署到centos上,centos + Python + dja ...
- sql 语句系列(计算的进阶)[八百章之第十六章]
前言 介绍两个实用的sql查询语句. 1.计算平均数时候,去除最大值和最小值. 2.修改累计值. 计算平均数时候,去除最大值和最小值 sql server: select AVG(sal) from( ...
- sql 语句系列(删库跑路系列)[八百章之第七章]
前言 最开心的章节,没有之一. 删除违反参照完整性的记录 EMP 是员工表,DEPT 是部门表 DEPTNO是部门编号 delete from EMP where not exists ( selec ...
- spring cloud 学习笔记 客户端(本地)均衡负载(三)
前言 在微服务中,一个服务可能即是服务端也是客户端,当别的服务调用该服务的时候这个服务就是服务端,当这个服务主动调用另外一个服务的时候,那么就是服务端. 作为客户端通过服务注册与发现获取某个服务的注册 ...
- MMDeploy部署实战系列【第一章】:Docker,Nvidia-docker安装
MMDeploy部署实战系列[第一章]:Docker,Nvidia-docker安装 这个系列是一个随笔,是我走过的一些路,有些地方可能不太完善.如果有那个地方没看懂,评论区问就可以,我给补充. 版权 ...
- hibernate4升级5带来的一些参数变化
public String hqlToHibernate5(String hql) { String[] tmp = hql.split(" "); String hqlTmp = ...
- 【ssm】极简的极省力的开发方式——针对简单型EasyUI的增删改查的后台管理
需要具备技能点: ssm框架搭建,mybatis generator的熟练使用 1.控制器: import java.util.HashMap; import java.util.Map; impor ...
- ES6中Module以及使用场景
一.介绍 模块,(Module),是能够单独命名并独立地完成一定功能的程序语句的集合(即程序代码和数据结构的集合体). 两个基本的特征:外部特征和内部特征 外部特征是指模块跟外部环境联系的接口(即其他 ...
- JavaWeb技术JSP连接数据库操作
"感谢您阅读本篇博客!如果您觉得本文对您有所帮助或启发,请不吝点赞和分享给更多的朋友.您的支持是我持续创作的动力,也欢迎留言交流,让我们一起探讨技术,共同成长!谢谢!" 0X01 ...
- win11设置笔记本合盖不睡眠
win11设置笔记本合盖不睡眠 直接搜索控制面板,类型选择大图标,找到电源选项 点击进入电源选项,然后点击选择电源按钮的功能 然后就可以看到一个关闭盖子时,设置成不采取任何操作 然后就可以了