mysql报错this is incompatible with sql_mode=only_full_group_by
1、报错信息
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column 'd.total_rated_power_transformer'; this is incompatible with sql_mode=only_full_group_by

2、修改配置文件
(1)找到配置文件my.cfg
find / -name "my.cnf"

(2)修改配置文件
vi /etc/my.cnf
加一行
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
如果原本有sql_mode,去掉ONLY_FULL_GROUP_BY

3、重启mysql使配置生效
service mysqld restart

mysql报错this is incompatible with sql_mode=only_full_group_by的更多相关文章
- mysql报错处理:incompatible with sql_mode=only_full_group_by
问题: 服务报错:incompatible with sql_mode=only_full_group_by,如下图所示: 分析: NLY_FULL_GROUP_BY是MySQL提供的一个sql_mo ...
- 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
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 ...
- mysql查询报错this is incompatible with sql_mode=only_full_group_by
临时改法:select @@GLOBAL.sql_mode;查询当前mysql的模式去掉ONLY_FULL_GROUP_BY重新设置:set @@GLOBAL.sql_mode='STRICT_TRA ...
- gruop by报错this is incompatible with sql_mode=only_full_group_by
set @@GLOBAL.sql_mode=''; set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_ ...
- 【Solution】MySQL 5.8 this is incompatible with sql_mode=only_full_group_by
[42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colu ...
- mysql 查询出现 "this is incompatible with sql_mode=only_full_group_by"错误解决方案,以及个人rpm方式重装所遇到的问题备份
一.错误说明 这个错误发生在mysql 5.7 版本及以上版本会出现的问题: mysql .7版本默认的sql配置是:sql_mode="ONLY_FULL_GR ...
- 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 ...
随机推荐
- Python循环-break和continue
break用于完全结束一个循环,跳出循环体,执行循环后面的语句 # -*- coding:utf-8 -*- __author__ = "MuT6 Sch01aR" count = ...
- http请求中的get和post的区别
1.标准答案 GET在浏览器回退时是无害的,而POST会再次提交请求. GET产生的URL地址可以被Bookmark,而POST不可以. GET请求会被浏览器主动cache,而POST不会,除非手动设 ...
- spring----IOC注解方式以及AOP
技术分析之Spring框架的IOC功能之注解的方式 Spring框架的IOC之注解方式的快速入门 1. 步骤一:导入注解开发所有需要的jar包 * 引入IOC容器必须的6个jar包 * 多引入一个:S ...
- Leetcode:1. Two Sum
public class TwoSum1 { public static void main(String[] args) { int[] nums = new int[]{2, 7, 11, 15} ...
- keras安装windows版
按照官网成功了.下面没有成功,貌似是 Anacode的问题 http://blog.csdn.net/hweiyi/article/details/70018317 http://blog.csdn. ...
- JpetStore目录文件关系分析
http://www.cnblogs.com/sunsonbaby/archive/2004/09/11/42245.html 从功能方向 至上向下分析 com.ibatis.jpetstore.s ...
- 多个VSTO解决方案间传输变量
参照微软官方文档,为需要公开参数的解决方案添加公开接口.不过稍显遗憾的是,不能传输List泛型 https://docs.microsoft.com/zh-cn/visualstudio/vsto/c ...
- vs2013提交项目到github
提交项目之前必须先安装Git,下载地址:https://git-scm.com/download/win 1.登录Github后,在顶部导航栏选择New repository: 2.打开Create ...
- 【并发编程】Future模式添加Callback及Promise 模式
Future Future是Java5增加的类,它用来描述一个异步计算的结果.你可以使用 isDone 方法检查计算是否完成,或者使用 get 方法阻塞住调用线程,直到计算完成返回结果.你也可以使用 ...
- React.Component(V16.8.6)
组件的生命周期 挂载 当组件实例被创建并插入 DOM 中时,其生命周期调用顺序如下: constructor() static getDerivedStateFromProps() render() ...