mysql5.7 1055

错误提示:

[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 GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

具体原因我没有去了解,据说是5.7版本中的sql_mode=only_full_group_by,

使用SQL语句查询:SHOW VARIABLES LIKE ‘%sql_mode%

可以发现ONLY_FULL_GROUP_BY这个东西的存在,只要把它去掉就行了。
SQL语句:
SET sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY‘,‘‘));
执行这一句就解决问题了。

原文地址:https://www.cnblogs.com/liushuchen/p/9934215.html

时间: 2024-11-07 05:43:26

mysql5.7 1055的相关文章

TP3.2项目 MySQL5.7报错1055 group by新特性

TP3.2项目中本来使用的是mysql5.6进行开发,切换到5.7之后,突然发现原来的一些sql运行都报错,错误编码1055,错误信息和sql_mode中的"only_full_group_by"有关,到网上看了原因,说是mysql5.7中only_full_group_by这个模式是默认开启的 ,网上给了很多解决办法,因为我用的是WAMP集成环境,我的解决办法如下: 点击MySQL选择MySQL settings ->选择sql-mode->选择sql-none和sql-

MySQL5.7.25报1055错误解决方案

基本信息: 系统一:CentOS7.5 + mysql5.7.25 系统二:win10 + mysql5.7.25解压缩版 数据库表结构如下: 对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 functi

Mysql5.7版本ERROR 1055问题

Sql优化过程中遇到Sql执行错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘advanced.dept.deptno’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mo

mysql5.7 group by语法 1055

先来看如下语句,查询默认存在的引擎表 之前使用的MySQL版本为5.7以下,根据support进行分组执行语句如下 添加跟分组support无关的字段engine 没有任何问题 现在使用的版本是5.7 之后根据support进行分组之后 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.ENGINES.ENGINE'

sql_mode=ONLY_FULL_GROUP_BY 导致lepus监控mysql5.7报错

lepus监控mysql5.7出现的问题: 2017-09-12 12:18:53 [INFO] check mysql controller finished. [WARNING] check mysql 192.168.10.9:3306 failure: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.proce

2015年6月10日 mysql5.5手册读书日记(4)

<?php /* InnoDB事务模型和锁定 15.2.10.1. InnoDB锁定模式 15.2.10.2. InnoDB和AUTOCOMMIT 15.2.10.3. InnoDB和TRANSACTION ISOLATION LEVEL 15.2.10.4. 持续非锁定读 15.2.10.5. 锁定读SELECT ... FOR UPDATE和SELECT ... LOCK IN SHARE MODE 15.2.10.6. Next-Key锁定:避免匪夷所思的问题 15.2.10.7. 持续读

mysql异常ERROR 1055 (42000)说明

具体异常信息如下: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'aaa.test.age' which is not functionally dependent on columns in GROUP BY clause;  this is incompatible with sql_mode=only_full_gro

MySQL5.7默认打开ONLY_FULL_GROUP_BY模式问题与解决方案

MySQL5.7后将sql_mode的ONLY_FULL_GROUP_BY模式默认设置为打开状态,这样一来,很多之前的sql语句可能会出现错误,错误信息如下: Error Code: 1055. Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column '×××' which is not functionally dependent on columns in GROUP B

mysql5.7 innodb数据库备份工具Xtrabackup的安装

mysql5.7 innodb数据库备份工具Xtrabackup的安装     wget mhttps://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.7/binary/redhat/6/x86_64/percona-xtrabackup-24-2.4.7-1.el6.x86_64.rpm Mysql5.7需要安装XtraBackup 2.4.1以上版本 官网地址 https://www.percona.com/down