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的更多相关文章

  1. mysql报错处理:incompatible with sql_mode=only_full_group_by

    问题: 服务报错:incompatible with sql_mode=only_full_group_by,如下图所示: 分析: NLY_FULL_GROUP_BY是MySQL提供的一个sql_mo ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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_ ...

  7. 【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 ...

  8. mysql 查询出现 "this is incompatible with sql_mode=only_full_group_by"错误解决方案,以及个人rpm方式重装所遇到的问题备份

    一.错误说明        这个错误发生在mysql 5.7 版本及以上版本会出现的问题:        mysql .7版本默认的sql配置是:sql_mode="ONLY_FULL_GR ...

  9. 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 ...

随机推荐

  1. shell入门-awk-2

    awk的条件操作符 ///显示第一段有root的行 [root@wangshaojun ~]# awk -F ':' '$1=="root"' 1.txtroot:x:0:0:ro ...

  2. Packet for query is too large

    数据库:mysql5.6 framework: play framework 1.2.4 近日处理批量数据的insert,update,涉及的保存更新sql大概有18w.我的操作如下: 1)每次取10 ...

  3. 微信小程序报错.wxss无法找到

    小程序原来一直运行正常,编译都没有问题,但今天更新了一下工具,就一直编译不过,报.wxss无法找到,搜索半天,才解决. 解决方案如下: 在控制台输入openVendor(), 在打开的目录中清除wcs ...

  4. CentOS 6.6 Oracle 安装

    阿里云服务器上要装Oracle,搞了半天才搞定. 项目阿里云用的是CentOS 6.5 X86_64 ,我本地虚拟机装的是CentOS 6.6 X86_64.不过用 cat /proc/version ...

  5. 9、samtool view

    参考:https://www.sogou.com/link?url=DOb0bgH2eKh1ibpaMGjuy6YnbQPc3cuKbWqIy1k6SBFomuBEhdSpHkUUZED5fr2OTk ...

  6. p2279&bzoj1217 消防局的设立

    传送门(洛谷) 传送门(bzoj) 题目 2020年,人类在火星上建立了一个庞大的基地群,总共有n个基地.起初为了节约材料,人类只修建了n-1条道路来 连接这些基地,并且每两个基地都能够通过道路到达, ...

  7. Luogu 3312 [SDOI2014]数表

    在这一篇里把所有的套路写全方便自己之后复习. 首先是一个小学生数学:$a$整除$b$ $ = $  $\frac{b}{a}$ 也就是说这题中格子$(i, j)$的值就是既能被$i$整除又能被$j$整 ...

  8. ExecuteNonQuery(),ExecuteScalar(),ExecuteReader的用法-转

    using System.Data.SqlClient;...SqlConnection conn = new SqlConnection(@"server=ws7\leosql;datab ...

  9. PIP本地源搭建

    Wheel包制作 # pip install wheel # mkdir ~/wheels # cd < Project > # pip wheel --wheel-dir=~/wheel ...

  10. Typography 文字排版

    标签的语义 1. 含语义的标签 2. 不含语义, 但是具有样式的class <h1></h1> <p class="h1"></p> ...