[Err] 1055 - Expression #1 of OR
2017-04-27 本文已影响1173人
loquito
今天在链接远程数据库(我的远程数据库是mysql5.7的)时报了一个“[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by”这样的错误,以前从来没有遇见过,现在记录一下,免得以后遇到。
我的mysql是在CentOS7.1下面的5.7.17
在 /etc/my.cnf 文件里加上如下:
sql_mode='NO_ENGINE_SUBSTITUTION'
然后,重启Mysql服务
systemctl restart mysqld