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. 报错apachectl -t

    httpd: apr_sockaddr_info_get() failed for wwwhttpd: Could not reliably determine the server's fully ...

  2. Ubuntu 切换root用户是时出现su Authentication failure

    su root 时出现错误su Authentication failure 原因是没有给root用户设置密码 sudo passwd root

  3. GIT 图形化操作指南

    Git操作指南(2) -- Git Gui for Windows的建库.克隆(clone).上传(push).下载(pull).合并 关于linux上建库等操作请看文章: http://hi.bai ...

  4. Python及R安装包版本查看方法

    R包查询 查询已安装的所有的包:library() 或installed.packages()(括号内为空,区别以上两项) 查询具体包的信息: help(package="pheatmap& ...

  5. byte和int转换

    byte b1=1,b2=2,b3,b6; final byte b4=4,b5=6; b6=b4+b5; b3=(b1+b2); System.out.println(b3+b6); b3=b1+b ...

  6. SQL语言 持续更新中……

    SQL提供了很多的聚集函数  COUNT([DISTINCT\ALL]*) SUM([DISTINCT\ALL]<列名>)AVG().…… WHERE 子句中是不能用聚集函数作为条件表达式 ...

  7. HTML5 & CSS3编程入门经典 ((美)Rob Larsen) pdf扫描版

    HTML和CSS是构建网页所需要了解的两种核心编程语言,拉尔森编著的这本<HTML5&CSS3编程入门经典>详细介绍了这两种语言. <HTML5&CSS3编程入门经典 ...

  8. unity3d 刷新速率

    using UnityEngine; using UnityEngine.UI; public class Text : MonoBehaviour { public Text t; private ...

  9. 用RegularJS开发小程序 — mpregular解析

    本文来自网易云社区. Mpregular 是基于 RegularJS(简称 Regular) 的小程序开发框架.开发者可以将直接用 RegularJS 开发小程序,或者将现有的 RegularJS 应 ...

  10. redis命令集

    查看使用运行服务:ping 关闭服务的连接:quit 切换数据库:select index 连接: redis-cli -h -a myPassword 查看密码: config get requir ...