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
解决方法一:
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的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- [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 ...
- 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 ...
- [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 ...
- 解决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 ...
- 记录一次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 ...
- 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",这个配置严 ...
随机推荐
- Activiti - 新一代的开源 BPM 引擎 (zhuan)
http://www.ibm.com/developerworks/cn/Java/j-lo-activiti1/ ****************************************** ...
- oracle 使用occi方式插入数据时中文乱码
这个是由于数据库的编码格式和我们输入的编码格式不一致导致的. 我们使用c++插入数据时数据库的中文显示??(即乱码),但同样的数据使用navicat进行插入却显示正常. 因此,问题并不是处在服务器端的 ...
- java中高并发和高响应解决方法
并发不高.任务执行时间长的业务要区分开看: 假如是业务时间长集中在I/O操作上,也就是I/O密集型的任务,因为I/O操作并不占用CPU,所以不要让所有的CPU闲下来,可以加大线程池中的线程数目,让CP ...
- 利用|,&,^,~,<<,>>>写出高效艺术的代码
简单介绍: 大家在阅读源代码的时候常常会看到一些比方以下这样特别难理解的代码. cancelEvent.setAction(MotionEvent.ACTION_CANCEL | (motionEve ...
- Entity Framework(六):数据迁移
在前面的几篇文章中,简单的介绍了如何使用Entity Framework的Code First模式创建数据库,但是,在前面的几篇文章中,我们都是通过使用数据库初始化策略来做,也就是每次先删除数据库然后 ...
- Hadoop周边生态软件和简要工作原理(一)
转自:http://www.it165.net/admin/html/201307/1531.html 基本都是在群里讨论的时候,别人问的入门问题,以后想到新的问题再补充进来.但是其实入门问题也很重要 ...
- 第二百四十八节,Bootstrap轮播插件
Bootstrap轮播插件 学习要点: 1.轮播插件 本节课我们主要学习一下 Bootstrap 中的轮播插件. 一.轮播 轮播插件就是将几张同等大小的大图,按照顺序依次播放. 基本实例. 第一步,给 ...
- import是page指令的一个属性。
以下不属于JSP的标准指令的是.(选择1项) A.Taglib B.Include C.Import D.Page 解答:C
- splash启动速度优化
在styles.xml中加入 <style name="AppSplash" parent="android:Theme"> <item na ...
- thinkPHP 上传文件的中文乱码
最新版本~用了里面的上传文件类,发现在保存文件原本名称的时候当有中文名的时候保存文件会显示乱码,看了下源代码发现在Tp上传驱动那里有点问题. // if (!move_uploaded_file($f ...