解决方法一:

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. 介绍CppShell

    写在前面 bajdcc/CppShell 最近心血来潮又造了个轮子,其实启发我的是bajdcc/jMiniLang中的管道思想,java运行着太慢,因而用C艹实现一把. 如题图所示,使用非常非常简单. ...

  2. vue知识点2018.6.3

    文件夹和文件名称 简介 build 构建脚本目录 config 应用程序的配置文件 index.html 入口页面 node_modules 存放 NPM 依赖模块 package-lock.json ...

  3. loadrunner录制成功但脚本内容为空,无任何代码//脚本中包含乱码

    使用loadrunner录制脚本,录制过程中也会显示“正在录制…”,并且有(XX个事件).但是脚本录制结束之后,脚本中没有任何内容,没有代码显示. 解决方法: 在脚本录制程序VU generator中 ...

  4. jquery 情况form表单的所有内容

    #project_file_upload 为表单的id $(':input','#project_file_upload') .not(':button, :submit, :reset, :hidd ...

  5. 延时NSTimer

    import Foundationimport UIKit class YijfkController:UIViewController{ override func viewDidLoad() { ...

  6. SVN文件排除

    背景:原来SVN库人事2.0在24.42server上,后来server改革,把库迁移到了24.248server上. 原来24.42上的库,在update或commit后文件总是绿色的.看着心里特别 ...

  7. PHP——数组和数据结构

    <body> <?php $arr[0]=5;//赋值定义 $arr[1]="aa"; print_r($arr); echo "<br /> ...

  8. word调整技巧

    a4纸如何留白: 

  9. 关于Unity中的摄像机

    摄像机是挂载Camera组件的能把3D世界物体拍摄成2D画面显示到屏幕上面的节点,角度不一样,位置不一样,拍摄出来的东西就不一样. Clear Flags:没有物体的时候,摄像机拍摄出的屏幕要绘制什么 ...

  10. lmbench

    lmbench作为性能检测工具的一种,提供内存,网络,内核等多方面的测试工具.是benchmark众多功能测试软件中的一种.几天了解了下,记录于此. 参考链接 http://www.bitmover. ...