Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'H5APP_WORKREPORT.c.id'
which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

原因:

这个错误的原因是高版本mysql(客户服务器版本5..7.18)默认的sql_mode包含ONLY_FULL_GROUP_BY,这个属性保证了select到的列都在group by中出现.

查看SQL_MODE的语句如下:

select @@GLOBAL.sql_mode;

解决方案:

方法一.可以使用SQL语句暂时修改SQL_MODE,重启mysql后就会事项:

set @@GLOBAL.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配置文件,通过手动添加sql_mode的方式强制指定不需要ONLY_FULL_GROUP_BY属性,my.cnf位于etc文件夹下,vim下光标移到最后,

添加如下:

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

错误:this is incompatible with sql_mode=only_full_group_by的更多相关文章

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

  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. mysql下this is incompatible with sql_mode=only_full_group_by解决方案

    本地测试没有问题,部署到客户服务器之后报如下错误: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 o ...

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

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

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

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

  9. 最近升级mysql5.7出现下面问题,ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by

    执行sql: SELECT * FROM `user_link` WHERE `group_id` IN ('78', '79') GROUP BY `link_id` 报错: SQLSTATE[42 ...

随机推荐

  1. SpringBoot war包部署到Tomcat服务器

    (1)pom.xml文件修改<packaging>war</packaging>,默认是jar包,<build>节点中增加<finalName>spri ...

  2. MySQL like用法

    MySQL LIKE 语法 LIKE运算符用于WHERE表达式中,以搜索匹配字段中的指定内容,语法如下: WHERE column LIKE pattern WHERE column NOT LIKE ...

  3. centos7 修改密码

    Centos7破解密码的方法   Centos7忘记密码   在工作或者自己练习的时候我们难免会大意忘掉自己的root密码,有些同学忘掉密码竟然第一选择是重装系统,工作中可万万使不得! 本篇博客将讲解 ...

  4. git 修改文件夹名字后如何提交

    将文件夹名字从 v1.0.1 修改为 v1.0.2 git add --ignore-removal "v1.0.2/xsxsx"

  5. IIS7 配置Http重定向到Https

    1.注意首先要安装url重定向模块 微软官方地址:https://www.microsoft.com/zh-CN/download/details.aspx?id=7435 百度网盘地址:链接: ht ...

  6. linux c/c++ 文件是否存在

    linux c/c++ 文件是否存在 #include <unistd.h> int FileExist(const char* fname) { return access(fname, ...

  7. centos7在upgrade的时候显示:Delta RPMs disabled because /usr/bin/applydeltarpm not installed

    前面安装信息,太多,省略 总计:113 MIs this ok [y/d/N]: yDownloading packages:Delta RPMs disabled because /usr/bin/ ...

  8. springboot 解决配置js/css/img缓存问题

    # 解决配置js/css/img缓存问题 spring.resources.chain.strategy.content.enabled=true spring.resources.chain.str ...

  9. Mac python 环境配置

    问题:mac 只带了python2.7,要想使用高版本的Python,如python3.x,只能再次安装了,这样就会遇到 两个版本的切换问题了 如下图 : 执行 which python 如下图,查看 ...

  10. 到达一个数 Reach a Number

    2018-09-24 14:19:58 问题描述: 问题求解: 初看到这个问题,直觉上认为可以通过BFS遍历解空间进行求解,因为本质上来说,这个问题和棋盘上移动马的问题是一类问题,都是可以转化成图的问 ...