1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ

我现在使用的是mysql5.7的版本,每次执行sql语句的时候会报如下的问题

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的配置文件 my.cnf
find / -name my.cnf
  • 打开 my.cnf
  • 添加如下代码
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
  • 重启mysql服务
systemctl restart mysqld
posted @ 2020-07-08 09:07  巫小诗  阅读(172)  评论(0编辑  收藏  举报