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. 基线baseline

    vertical:元素的垂直对齐方式:默认 vertical:baseline ,一行内对其基线,如下图就是以父元素基线对齐,上图vertical:top 垂直对齐方式,行内元素头部对齐.

  2. 11、Python函数基础(定义函数、函数参数、匿名函数)

    函数先定义函数,后调用 一.定义函数: 1.简单的规则: 函数代码块以 def 关键词开头,后接函数标识符名称和圆括号 (). 任何传入参数和自变量必须放在圆括号中间,圆括号之间可以用于定义参数. 函 ...

  3. TCP server 为什么一个端口可以建立多个连接?

    https://segmentfault.com/q/1010000003101541 如果是tcp client用同一个本地端口去连不同的两个服务器ip,连第二个时就会提示端口已被占用.但服务器的监 ...

  4. 准确率(Accuracy) 精确率(Precision) 与 召回率(Recall)

    准确率(Accuracy)—— 针对整个模型 精确率(Precision) 灵敏度(Sensitivity):就是召回率(Recall) 参考:https://blog.csdn.net/Orange ...

  5. Spring @Scheduled定时任务的fixedRate,fixedDelay,cron的作用和不同

    一.   三种定时类型. 1.cron  --@Scheduled(cron="0/5 * * * *?") 当时间达到设置的时间会触发事件.上面那个例子会每5秒执行一次. 201 ...

  6. 论文画图工具使用(2)vision软件

    1 软件安装和破解 https://www.cnblogs.com/shitou6/p/8986396.html 自己的网盘 链接:https://pan.baidu.com/s/1EWU0xLMTI ...

  7. 基本例程(4-1)手势识别C++ 和简单形状匹配

    扩展库https://blog.csdn.net/Taily_Duan/article/details/52130135 opencv3.3+扩展库 /************************ ...

  8. 钠 GZY整理贪心

    目录 CF140C New Year Snowmen CF161B Discounts P1842 奶牛玩杂技 CF140C New Year Snowmen #include <bits/st ...

  9. 你向 Mysql 数据库插入 100w 条数据用了多久?

    阅读本文大概需要 2 分钟. ▌目录 多线程插入(单表) 多线程插入(多表) 预处理 SQL 多值插入 SQL 事务( N 条提交一次) ▌多线程插入(单表) 问:为何对同一个表的插入多线程会比单线程 ...

  10. [Beta]Scrum Meeting#7

    github 本次会议项目由PM召开,时间为5月12日晚上10点45分 时长15分钟 任务表格 人员 昨日工作 下一步工作 木鬼 撰写博客整理文档 撰写博客整理文档 swoip 为适应新功能调整布局 ...