MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains问题

admin2025-11-04量化交易9

使用Navicat连接MySQL数据库进行查询的时候,如果Navicat版本较低,MySQL数据库又5.7以上的版本,会报下面的错误,Navicat版本较低造成的,不影响结果的显示,查询结果也是正确的。

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的配置文件里增加SQL_Mode保存重启服务器

在这里插入图片描述


sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION


一键获取完整项目代码

bash

1

解决方式二:

更新的Navicat版本,或者下载免费试用的最新版本,就不会有个错误提示了