[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
网上看到很多人回答解决这个问题的方法,但是有的不生效!
我的解决方法是:
首先声明我的mysql版本是解压版本!
修改my-default.ini配置文件里的sql_mode='NO_ENGINE_SUBSTITUTION',或者是去掉sql_model后面的ONLY_FULL_GROUP_BY,重启mysql服务可能你会发现没有效果。
我把mysql的服务移除掉然后再重新注册一遍就行了。
注:
移除服务命令为:mysqld -remove
服务安装命令: mysqld -install MySQL --defaults-file="D:\mysql-5.7.11-winx64\my-default.ini"