[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
求解求解求解!!!
使用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,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。
在命令窗口
进行select @@sql_mode进行查看
之后进行修改
set @@sql_mode=NO_ENGINE_SUBSTITUTION
亲测,完美解决
1055 错误是 SQL_MODE 严格模式帮你检查出代码错误的报错,不要简单把严格模式禁止掉,最好理解这个模式的运行原理。