mysql 8.0下的SELECT list is not in GROUP BY clause and contains nonaggregated column
mysql的版本
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.12 |
+-----------+
在执行group by时遇到报错,具体如下
mysql> select * from api_properties GROUP BY file_id order by file_id;
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bim.api_properties.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
记得上次在5.7下也遇到了同样的问题 5.7的
win下修改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
重启mysql
启动失败,描述为
2019-08-27T09:22:54.827016Z 0 [ERROR] [MY-011071] [Server] D:\phpstudy_pro\COM\..\Extensions\MySQL8.0.12\\bin\mysqld.exe: Error while setting value 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'
2019-08-27T09:22:54.827016Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-08-27T09:22:54.828016Z 0 [Note] [MY-010120] [Server] Binlog end
NO_AUTO_CREATE_USER 在 5.7.* 的日志中提到已废除该模式,在 8.0.11 中删除了
修改设置为
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
重启mysql,问题解决
mysql 8.0下的SELECT list is not in GROUP BY clause and contains nonaggregated column的更多相关文章
- mysql问题解决SELECT list is not in GROUP BY clause and contains nonaggregated column
今天在Ubuntu下的部署项目,发现一些好好的列表页面发生 :Expression # of SELECT list is not in GROUP BY clause and contains no ...
- 【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由5.6升级到5.7出现的异常---Expression #23 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'c.commentCount' which is not functionally dependent on columns in GROUP BY clause;
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expre ...
- mysql升级后出现Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
安装了mysql5.7,用group by 查询时抛出如下异常: Expression #3 of SELECT list is not in GROUP BY clause and contains ...
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loser.tank_admin.login_ip' which is not functionally dependent on columns in GROUP BY clause; this is
执行SQL: SELECT login_name,login_ip,sex FROM tank_admin GROUP BY login_name ; 时抛出异常. Expression #2 of ...
- 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报错: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 ...
- Error Code: 1055.Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
环境:mysql-8.0.15-winx64 问题描述: Error querying database. Cause: java.sql.SQLSyntaxErrorException: Expre ...
- 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 ...
随机推荐
- spring、springMvc、springBoot和springCloud的联系与区别
spring和springMvc: 1. spring是一个一站式的轻量级的java开发框架,核心是控制反转(IOC)和面向切面(AOP),针对于开发的WEB层(springMvc).业务层(Ioc) ...
- TCP server 为什么一个端口可以建立多个连接?
https://segmentfault.com/q/1010000003101541 如果是tcp client用同一个本地端口去连不同的两个服务器ip,连第二个时就会提示端口已被占用.但服务器的监 ...
- MongoDB远程连接-MongoDB Compass
MongoDB Compass Community连接界面设置
- 异常0xc000041d的抛出过程
为了说明这个过程,我们必须写一个示例程序,如下: #include "stdafx.h" #include <tchar.h> #include <stdio.h ...
- 原手下一名98年的java离职了
原手下一名98年的java离职了,回家考试要2年. 系统做的还算凑合,毕竟年龄在这. 需要改善的地方我会放到自己的项目管理工具中去改善. 离职前他一直跟我说微服务的启动是用docker,也感谢他,我们 ...
- pytest + allure 生成测试报告
pytest测试样例规则:测试文件以test_开头(以_test结尾也可以)测试类以Test开头,并且不能带有 init 方法测试函数以test_开头断言使用基本的assert即可 ubuntu 安装 ...
- Linux搭建简单的http文件服务器111
http://192.168.31.69:8090/file/http://47.92.90.25:21888/file/在Ubuntu中通过apt-get install apache2 安装apa ...
- 分享一个Python脚本--统计redis key类型数据大小分布
概述 今天主要介绍怎么统计redis key类型数据大小分布. 原理:使用redis命令: scan.pipline.type 和 debug object 来得到 redis key 信息. 脚本 ...
- Cookie 的 SameSite 属性
转自http://www.ruanyifeng.com/blog/2019/09/cookie-samesite.html Chrome 51 开始,浏览器的 Cookie 新增加了一个SameSit ...
- 【Beta】Scrum meeting 7
目录 写在前面 进度情况 任务进度表 Beta-1阶段燃尽图 遇到的困难 照片 commit截图记录 后端代码仓库 技术博客 写在前面 例会时间:5.11 22:30-22:50 例会地点:微信群语音 ...