错误重现
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘siku_carpooling.sc_template.id’ which is not functionally dependent on columns in GROUP BY clause; this is in
错误解决
运行命令SET GLOBAL sql_mode=’’; 但是这样重启后就失效了,因为set global的配置是放在内存中的。
设置mysql的配置文件,在/etc/my.cnf
ps:这个设置是mysql5.7.5版本之后默认加入的,在mysql5.7.11里show global variables like “sql_mode”,得到如下的结果:
修改/etc/my.cnf在[mysqld]下面添加如下列:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
————————————————
版权声明:本文为CSDN博主「MarsWill」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/marswill/article/details/84936761