mysql5.7 1055

Posted liushuchen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql5.7 1055相关的知识,希望对你有一定的参考价值。

错误提示:

[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 

具体原因我没有去了解,据说是5.7版本中的sql_mode=only_full_group_by,

使用SQL语句查询:SHOW VARIABLES LIKE ‘%sql_mode%

可以发现ONLY_FULL_GROUP_BY这个东西的存在,只要把它去掉就行了。
SQL语句:
SET sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY‘,‘‘));
执行这一句就解决问题了。





以上是关于mysql5.7 1055的主要内容,如果未能解决你的问题,请参考以下文章

Mysql5.7版本ERROR 1055问题

mysql5.7 group by语法 1055

TP3.2项目 MySQL5.7报错1055 group by新特性

MySQL5.7:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

MySQL5.7:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

MySQL5.7:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains