问题描述
- 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求解求解求解!!!
解决方案
使用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
解决方案二:
在命令窗口
进行select @@sql_mode进行查看
之后进行修改
set @@sql_mode=NO_ENGINE_SUBSTITUTION
亲测,完美解决