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 问题解决。
GROUP BY clause and contains nonaggregated 报错处理相关推荐
- MySQL查询的时候出现 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre报错
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre -后面一大堆 出错就是这样 我们可以在网上看到 ...
- mysql 报错解决思考Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column
mysql报错: [Err] 1055 - Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggrega ...
- 报错,> 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
错误: mysql: select * ,count(*)as count from app_cash_trans_log group by app_cash_trans_log.tran_code ...
- 数据库报错SELECT list is not in GROUP BY clause and contains nonaggregated col
数据库报错SELECT list is not in GROUP BY clause and contains nonaggregated col Expression #12 of SELECT l ...
- mysql使用group by查询报错SELECT list is not in GROUP BY clause and contains nonaggregated column.
mysql使用group by查询报错SELECT list is not in GROUP BY clause and contains nonaggregated column. 出现原因 使用g ...
- MySQL报错 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- 原因: 在mysql5.7以上的版本中 ...
- 使用group by语句时,报错,获取不到数据,出现SELECT list is not in GROUP BY clause and contains nonaggregated column 问题
SELECT list is not in GROUP BY clause and contains nonaggregated column 报错如下: Expression #2 of SELEC ...
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c ...
- SELECT list is not in GROUP BY clause and contains nonaggregated column
问题: SELECT list is not in GROUP BY clause and contains nonaggregated column 原因: 举个例子,有这么一个查询语句: SELE ...
最新文章
- Stanford机器学习笔记-5.神经网络Neural Networks (part two)
- Unity VR游戏开发干货教程:优化VR体验
- C#黔驴技巧之实现统计结果排名
- 大数据,从青铜到王者
- 如何使用matlab的siso,利用Matlab内建程式SISODesignTool完成系统分析(Matlab61)开启.PDF...
- Vue.js入门系列教程(二)
- 2019年12月数据库流行度排行:前三甲高位收官 数据库重获增长趋势
- Qt系列教程-yafeilinx Qt入门教程
- Android下异步扫描视频文件缩略图
- matlab串级控制系统设计,SVPWM在串级调速系统中的MATLAB仿真研究
- PHP与西门子PLC,西门子PLC“与”指令
- 华为路由器基本使用命令
- 阿里云域名如何拍卖?
- 安装程序总是提示重启计算机,技巧| 安装西门子软件时提示重启电脑的解决办法...
- threejs生成由内而外光圈、城市掠过。
- linux中shift用法,Linux shell脚本中shift的用法说明
- MTK_on_line_FAQ_SW_ALPS_System+-+Bootup
- Descending Order 实践练习
- 登录前的人机验证VAPTCHA
- ABeamNews|ABeam旗下德硕管理咨询(上海)荣获「2021-2022上半年SAP最佳云转型合作伙伴」大奖
热门文章
- 小米手机miui12稳定版蓝牙时断不稳定的解决办法。
- 如何修改服务器凭据,如何更改操作数据库帐户的用户凭据
- ZigBee组网机制以及数据的发送和接收
- python基础第二课(小白piao分享)
- 开启 Zookeeper 四字命令(is not executed because it is not in the whitelist)
- java设计模式有哪些(java设计模式刘伟课后答案)
- python案例——数学问题案例
- Linux下Watchdog
- 连续10年霸榜第一?程序员「最常用」的编程语言是它?
- named_modules named_parameters