1055

我现在使用的是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
原文地址:https://www.cnblogs.com/wuxiaoshi/p/13264911.html