解决方法一:

SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

优点:不用重启mysql

缺点:重启mysql后还会出现标题错误

SELECT @@global.sql_mode;

查询全局的

@@session.sql_mode 当前回话的

上面的只是修改当前回话,需要修改全局的sql_mode

解决方法二

在my.cnf中修改

[mysqld] 
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

注:sql_mode值用select @@sql_mode;查询出来后,将ONLY_FULL_GROUP_BY去掉剩余的值

优点:重启mysql 一次性解决问题

缺点:需要重启mysql

可以结合上述两种方案,来避免重启mysql服务,又能避免需要马上重启mysql

注:

my.cnf linux路径默认是/etc/my.cnf

在window下是my.ini

1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause的更多相关文章

  1. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this

    最近使用新版本的mysql,执行语句的时候报错.网上找了一下,解决方法如下: vim /etc/mysql/conf.d/mysql.cnf [mysqld] sql_mode=STRICT_TRAN ...

  2. mysql [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GRO

    [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c ...

  3. MySQL- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GR

    新建的mysql,在查询时报异常信息,虽然有正常执行结果. [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY claus ...

  4. [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loser.tank_admin.login_ip' which is not functionally dependent on columns in GROUP BY clause; this is

    执行SQL: SELECT login_name,login_ip,sex FROM tank_admin GROUP BY login_name ; 时抛出异常. Expression #2 of ...

  5. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'kindergarten.n.stuMChkTime' which is not functionally dependent on columns in GROUP BY clause; this is in

    错误原因: ​ sql _mode中only _full _group _by不兼容的问题 解决思路: ​ 既然是only _full _group _by不兼容,那就把它去掉就好啦 show var ...

  6. [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'

    在Navicat Premium中执行Mysql的一条删除语句,虽然执行成功了,却提示已下错误: 受影响的行: 时间: .005s of ORDER BY clause is not in GROUP ...

  7. 解决mysql报错:- Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'

    mysql执行报错: - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c ...

  8. 记录一次mysql由5.6升级到5.7出现的异常---Expression #23 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'c.commentCount' which is not functionally dependent on columns in GROUP BY clause;

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expre ...

  9. mysql 执行报错:Error querying database. Cause: java.sql.SQLSyntaxErrorException:which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    1.这个错误发生在mysql 5.7 版本及以上版本会出现的问题: mysql 5.7版本默认的sql配置是:sql_mode="ONLY_FULL_GROUP_BY",这个配置严 ...

随机推荐

  1. mysql 主主复制(双主复制)binlog-do-db

    [root@DB ~]# grep "binlog-do-db" /etc/my.cnf binlog-do-db = test [root@DB-S ~]# grep " ...

  2. PKI/CA

    PKI( Public Key Infrastructure )指的是公钥基础设施. CA ( Certificate Authority )指的是认证中心. PKI从技术上解决了网络通信安全的种种障 ...

  3. Spring学习10-SpringMVC入门

       二.SpringMVC请求处理流程    其中Front controller :前端控制器 Controller:后端控制器   三.Spring核心组件及请求处理流程

  4. 【高并发简单解决方案】redis缓存队列+mysql 批量入库+php离线整合

    原文出处: 崔小拽 需求背景:有个调用统计日志存储和统计需求,要求存储到mysql中:存储数据高峰能达到日均千万,瓶颈在于直接入库并发太高,可能会把mysql干垮. 问题分析 思考:应用网站架构的衍化 ...

  5. :-1: error: [debug/moc_gotocelldialog.cpp] Error 2

    环境:Qt5.3 问题描述: 我将一个已经做好可以运行的小程序拷贝了一下,放在另一个目录下打开,却无法运行,提示上面的错误,而且原程序也无法运行了.不知道为什么,还没有答案...

  6. android布局自适应小示例(用户反馈界面)

    要求: 1.整个界面刚好填满屏幕,不需要滚动 2.输入反馈内容的EditText控件高度能够自适应 3.提交按钮位于屏幕最下方 核心布局文件如下: <?xml version="1.0 ...

  7. 关于Safe DOG的文件上传bypass

    Author:倾旋payloads@aliyun.com本文由科拉实验室成员倾旋原创文章 Part 1 分析 此文主要研究安全狗的数据包分析功能,由于很多人都认为安全狗是通过正则去匹配的,那么暂且那么 ...

  8. Groovy学习专栏

    今天新开了一个groovy的学习专栏,因为最近工作中会用到Groovy模板. 然后就是在网上找了一下Groovy模板相关的东西发现ibm中在2005年就有讲到这个的,我勒个去,这么早,我初中都还没毕业 ...

  9. rp2836 网卡以及串口与接插件位置关系

    P3     ETH1 P6     ETH0 P7     /dev/ttyS3 调试口 P13-1  /dev/ttyS2  rs485+ P13-2  /dev/ttyS2  rs485- P1 ...

  10. Mybatis Batch 批量操作

    Mybatis Batch 批量操作 http://www.blogjava.net/diggbag/articles/mybatis.html