2 yyh777 yyh777 于 2016.04.10 12:46 提问

incompatible with sql_mode=only_full_group_by

[Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'xxx.xxx.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

这个错误怎么解决?

linux下 5.7数据库。
看网上的说话修改 /etc/my.cnf 文件
sql_mode='NO_ENGINE_SUBSTITUTION
或者
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

都不管用,一直报这个错误!求解!!!

扩展链接:
http://blog.csdn.net/lwei_998/article/details/40431049
http://zhidao.baidu.com/link?url=vEv06LSZdcr0boLCK54RbTLu9gJgetu5VB-Z_PfVfPBNWymJISgV_Qr7MakNSiLfN99O3DbvBUIqL8NRK5oFFUg591z_WSm3czOWCLJyIl3

求解求解求解!!!

2个回答

tangfei8494
tangfei8494   2016.04.20 15:00

在命令窗口
进行select @@sql_mode进行查看
之后进行修改
set @@sql_mode=NO_ENGINE_SUBSTITUTION

亲测,完美解决

CSDNXIAOC
CSDNXIAOC   2016.04.10 12:52

使用mysql 5.7.11-debug Homebrew时报错
错误信息如下:
26 Mar 2016 09:35:23,432 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:147 - Expression #1 of SELECT list is not in GROUP BY clause and contains nona......
答案就在这里:incompatible with sql_mode=only_full_group_by
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
mysql5.7.9报错this is incompatible with sql_mode=only_full_group_by之解决
之前一直用的是5.6版本的mysql,最近升级到5.7.9之后之前运行挺正常的项目报错:which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by。经过网上一番查找,解决如下。 我的mysql是部署在linu
sql_mode=only_full_group_by研读
MySQL 5.7.5后only_full_group_by成为sql_mode的默认选项之一,这可能导致一些sql语句失效。比如下表game: id group_id name score 1 A 小刚 20 2 B 小明 19 3 B 小花 17 4 C 小红 18 执行sql: select name, grou
mysql下this is incompatible with sql_mode=only_full_group_by解决方案
本地测试没有问题,部署到客户服务器之后报如下错误:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘testID’ which is not functi
mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by
今天在使用mysql命令行进行分组时报错: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_tl.emp.id' which is not functionally dependent on columns
Mysql this is incompatible with sql_mode=only_full_group_by 异常
数据库从5.5版本直接升级到了5.7版本,在执行Sql的时候出现异常  ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #5 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column
mysql 5.7 this is incompatible with sql_mode=only_full_group_by 问题
1、查看sql_mode select @@sql_mode 查询出来的值为: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 2、去掉ONLY_FULL_GR
MySQL Error this is incompatible with sql_mode=only_full_group_by
本次问题发生在我将WampServer工具里从 Version 2.2 升级到 Version 3.0.6 64bit        同时也把MySQL从5.5.20升级到5.7.14版本,然后之前写的部分sql语句就出错了。 错误信息:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and
mysql的only_full_group_by
点击统计分析时突然交易统计报错,原来一直正常,看了错误代码,发现mysql报错,错误代码如下: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'XXX.T_XXX.PAY_FINISH_DATE' which is not functionally depend
Mysql only_full_group_by以及其他关于sql_mode原因报错详细解决方案
Mysql only_full_group_by以及其他关于sql_mode原因报错详细解决方案 网上太多相关资料,但是抄袭严重,有的讲的也是之言片语的,根本不连贯(可能知道的人确实不想多说) 我总共花了3个多小时,反复测试,总结一下 Mysql only_full_group_by以及其他关于sql_mode原因报错详细解决方案 报错信息:原因:怎么查看
【mysql 使用错误解决】this is incompatible with sql_mode=only_full_group_by
使用mysql的时候遇到的一些错误1、Err1055,出现这个问题往往是在执行sql语句时候,在最后一行会出现这个问题。[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'