mysql 报错 1055 sql_mode=only_full_group_by
报错日志:
[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
原因很清楚
最后一句: sql_mode=only_full_group_by
查询sql-model: select @@global.sql_mode;
查到之后有这些:.
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
可以发现是因为ONLY_FULL_GROUP_BY这个值的问题,去掉就行了,
输入命令set @@global.sql_mode='';
直接设置为空
问题解决!!