欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MySQL:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY with sql_mode=only_full_group

程序员文章站 2023-12-28 16:23:16
...

MySQL异常:

[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

解决办法:在my.ini(windows 中my.ini在mysql安装目录下,没有请自行创建。)中加入如下代码:

[mysqld] 
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

MYSQL8以上已经取消了NO_AUTO_CREATE_USER,sql_mode中不能包含这个,否责不能正常启动。

 

 

上一篇:

下一篇: