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的更多相关文章

  1. 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 ...

  2. 【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 ...

  3. 记录一次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 ...

  4. 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 ...

  5. [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 ...

  6. 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 ...

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

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

  9. 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 ...

随机推荐

  1. MapReduce的核心运行机制

    MapReduce的核心运行机制概述: 一个完整的 MapReduce 程序在分布式运行时有两类实例进程: 1.MRAppMaster:负责整个程序的过程调度及状态协调 2.Yarnchild:负责 ...

  2. 如何为MacOS X终端设置代理

    http://codelife.me/blog/2012/09/02/how-to-set-proxy-for-terminal/ 本文介绍如何在MacOS X终端里使用代理访问网络,虽然只在Moun ...

  3. hdu4027-Can you answer these queries? -(线段树+剪枝)

    题意:给n个数,m个操作,分两种操作,一种是将一段区间的每个数都开根号,另一种是查询区间和. 解题:显然对每个数开根号不能用lazy的区间更新.一个一个更新必然爆时间,对1开根号还是1,如果一段区间都 ...

  4. 【每天学一点linux】后台进程不打印日志

    command > out.file 2>&1 & 将文件输出到指定的文件中

  5. PostgreSQL 慢查询SQL跟踪

    PostgreSQL 开启慢SQL捕获在排查问题时是个很有效的手段.根据慢SQL让我在工作中真正解决了实际问题,很有帮助. PostgreSQL 日志支持的输出格式有 stderr(默认).csvlo ...

  6. dolt 基于git协议的数据管理工具

    dolt 基于git 协议提供了多版本,分支特性的数据管理工具,使用简单,同时也提供了类似github 的一个云服务 安装 下载地址 https://github.com/liquidata-inc/ ...

  7. memset使用技巧

    memset可以对高位数组进行初始化,非常方便.需要注意的是memset的头文件是string.h和memory.h . 下面来谈memset的4个使用技巧: (注:一下dp高维数组都是全局变量,局部 ...

  8. 洛谷p2330繁忙的都市题解

    题面 根据题意来分析, 要求出你选了几条路, 最小生成树是能解的, 那么就直接输出n - 1条路即可, 至于最大值则走一遍最小生成树求出即可 这里提供最小生成树的两种方法 1. 克鲁斯卡尔 克鲁斯卡尔 ...

  9. nuxt项目服务端渲染应用部署、使用pm2守护进程及遇到的问题处理

    服务端渲染应用部署应该先编译构建,然后再启动 Nuxt 服务,可通过以下两个命令来完成: nuxt build nuxt start 我们已经在pakage.json里配置好script命令 { &q ...

  10. 利用iptables做端口转发

    需求背景: A与C不在同一网段无法直接访问,而A和B,C和B可以互通.现需要A借助B访问C的3306端口. 解决方案: 利用iptables配置规则,实现端口转发. 具体操作: 在B上开启端口转发功能 ...