mysql报错处理:incompatible with sql_mode=only_full_group_by
问题:
服务报错:incompatible with sql_mode=only_full_group_by,如下图所示:

分析:
NLY_FULL_GROUP_BY是MySQL提供的一个sql_mode,通过这个sql_mode来提供SQL语句GROUP BY合法性的检查。各种精确查询会报错
解决方案:
1. 执行以下sql,关闭ONLY_FULL_GROUP_BY(这种方式在重启mysql后会失效)
set @@GLOBAL.sql_mode='';
set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
2. 修改/etc/my.cnf(重启后仍然生效)
在mysqld下添加: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服务,OK!
3. 查看sql_model参数:
SELECT @@GLOBAL.sql_mode;
SELECT @@SESSION.sql_mode;
mysql报错处理:incompatible with sql_mode=only_full_group_by的更多相关文章
- mysql下this is incompatible with sql_mode=only_full_group_by解决方案
本地测试没有问题,部署到客户服务器之后报如下错误: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 o ...
- this is incompatible with sql_mode=only_full_group_by
mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by - Jim_.NET - 博客园 http://www.c ...
- mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by
在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause ...
- mysql报错this is incompatible with sql_mode=only_full_group_by
1.报错信息 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP ...
- mysql(5.7以上)查询报错:ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
执行mysql命令查询时: select * from table_name错误信息如: [Err] 1055 - Expression #1 of ORDER BY clause is not in ...
- 5.7版本mysql查询报错:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:...this is incompatible with sql_mode=only_full_group_by
先瞧下日志: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException ...
- Mysql插入数据时,报错this is incompatible with sql_mode=only_full_group_by
Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'inform ...
- mysql5.7 gruop by报错this is incompatible with sql_mode=only_full_group_by
解析:在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY cla ...
- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: ..... this is incompatible with sql_mode=only_full_group_by
一.异常信息 org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysq ...
随机推荐
- 33.服务之间的调用之RPC、Restful深入理解
33.服务之间的调用之RPC.Restful深入理解 2018年05月08日 01:52:42 郑学炜 阅读数 13577更多 分类专栏: 6.框架 版权声明:本文为博主原创文章,遵循CC 4.0 ...
- hadoop批量命令脚本xcall.sh及jps找不到命令解决
1.xcall.sh批量命令脚本: #!/bin/bash params=$@ i=128 for (( i=128 ; i <= 131 ; i = $i + 1 )) ; do echo = ...
- 什么是blazor
blazor是一个微软推出的基于webassembly和C#(面向对象) 以及F#(面向函数)的前端框架 它类似vue react anglar的单页前端框架 只是他不再使用js 或typescrip ...
- mongoose操作笔记
一.mongoose文档地址: https://cn.mongoosedoc.top/docs/api.html#update_update https://www.cnblogs.com/web-f ...
- C# 下sqlite简单使用
1. 对数据库增, 删, 改 //数据库文件存储路径,(Environment.CurrentDirectory:为当前工作目录的完全路径) string dbPath = "Data So ...
- FastDFS集群部署(转载 写的比较好)
FastDFS集群部署 之前介绍过关于FastDFS单机部署,详见博文:FastDFS+Nginx(单点部署)事例 下面来玩下FastDFS集群部署,实现高可用(HA) 服务器规划: 跟踪服务器1 ...
- luogu P4365 [九省联考2018]秘密袭击coat
luogu 这里不妨考虑每个点的贡献,即求出每个点在多少个联通块中为第\(k\)大的(这里权值相同的可以按任意顺序排大小),然后答案为所有点权值\(*\)上面求的东西之和 把比这个点大的点看成\(1\ ...
- Spark 2.43读取.json文件入库到MySQL 8
如果没有安装包,可以用我的这个 百度网盘链接点击进入 提取码: eku1 解压之后 准备开始配置环境变量 如果运行时候报错参考 (java.io.IOException: Could not loca ...
- symfony3 yml配置文件详解
AppBundle\Entity\BlogComment: //映射实体 type: entity //类型 repositoryClass: AppBundle\Repository ...
- kubeadm安装k8s1.13
1.环境介绍: centos 7.4.1708 关闭selinux和iptable,环境很重要! 主机 ip地址 cpu核数 内存 swap host解析 k8s-master 10.0.0.11 2 ...