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 ...
随机推荐
- centos7 查看启动ntp服务命令
标签(空格分隔): centos7 系统 1. 查看ntp服务命令: [root@node1 ~]# systemctl status ntpd * ntpd.service - Network Ti ...
- Java数组的基本讲解
由于Java数组涵盖的内容比较多,这里从个人的角度对主要的内容进行相关的讲解. 如有不足,欢迎批评指正~ 1)Java数组是动态还是静态的啊? Java语言是典型的静态语言,由此推断Java数 ...
- 关于KMeans 最外围点移除实验(其中心保持不变)
import matplotlib.pyplot as plt from sklearn.datasets import make_blobs import numpy as np X,labels ...
- 浏览器怎么禁用和开启Javascript
转自;http://360.bgu.edu.cn/help/openJsHelp.html IE内核的浏览器禁用和启用Javascript功能都类似,首先我们需要打开IE8浏览器. 之后点击其右上角的 ...
- chef语法和案例
1. 添加用户 $ vim create_user.rb -----------------------------------> user 'charlie' do //创建一个uid为88的 ...
- javascript深入理解js闭包(转)
javascript深入理解js闭包 转载 2010-07-03 作者: 我要评论 闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现. ...
- Unusual Sequences
题意: 求解合为 y 的总体 gcd 为 x 的正整数非空序列个数. 解法: 特判一下后,原问题等价于合为 s = y/x 的整体gcd为1的正整数序列个数. 1.$ans = \sum_{\sum{ ...
- p1197&bzoj1015 星球大战
传送门(洛谷) 传送门(bzoj) 题目 很久以前,在一个遥远的星系,一个黑暗的帝国靠着它的超级武器统治者整个星系.某一天,凭着一个偶然的机遇,一支反抗军摧毁了帝国的超级武器,并攻下了星系中几乎所有的 ...
- synchronized关键字的作用域
转自:http://www.cnblogs.com/devinzhang/archive/2011/12/14/2287675.html 1.synchronized关键字的作用域有二种: 1)是某个 ...
- C++中struct和class定义类区别
有一种常见的误解认为用struct保留字定义的类与用class定义的类有很大的区别.唯一的不同只是默认的成员保护级别和默认的派生保护级别,没有其他的区别. 1. 用class定义的类,默认的成员访问级 ...