解决方法一:

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. error while loading shared libraries *.so.*

    转自 http://my.oschina.net/u/561492/blog/192341 ubuntu12.04-64位编译Android4.2时出现问题:error while loading s ...

  2. 基于jquery和svg超炫的网页动画

    今天给大家分享一款基于jquery和svg超炫的网页动画.这款动画效果非常炫.下面还有重播.慢速.和反向动画按钮.效果非常漂亮.一起看下效果图: 在线预览   源码下载 实现的代码. html代码: ...

  3. js 開始时间,当前时间,结束时间的比較

    //開始时间不能小于当前时间 function startTimeIsBigThanTotay(startTime){ var startdate = new Date((startTime).rep ...

  4. Android——初学

  5. C#代码获取或设置Iframe中的HTML

    在最近的数据采集研究中, 发现很多页面的内容都是在iframe中的, 这位采集带来了不少困难. 经过一番思考之后, 我想到了C#的解决办法: 1. 运行Spider Studio, 加载页面 http ...

  6. 介绍编译的less的几种IDE工具

    介绍编译的less的两种IDE工具 现在css预编译越来越普及了,著名的有less.sass.stylus等等等等.功能上基本上都是大同小异.这些个玩意儿主要表达的意思就是:“像编程一样的编写你的cs ...

  7. Java 07 example

    留下两个例子作为参考, 1. 追逐小方块的例子 2. HashMap 和 Iterator 的例子 Example one: import acm.graphics.*; import acm.pro ...

  8. EasyUI 另一种form提交方式

    (function ($) { window.XW = {}; //全局系统对象 //异步请求统一调用方法 XW.ajax = function (options, param, callback) ...

  9. Sublime 插件补充

    开启vim模式+autosave+Livereload插件 安装参考:emmmet http://www.cnblogs.com/wuheng1991/p/6144955.html

  10. Android 扩展OkHttp支持请求优先级调度

    在当今这个App泛滥的时代,网络请求差点儿是每个App不可缺少的一部分.请求差点儿遍布App的每个界面中.我们进入A界面后.App发起了一系列请求,这时候假如另一部分请求没有被运行,我们就进入B界面開 ...