MySQL异常:Expression #1 of ORDER BY clause is not in ... with sql_mode=only_full_group_by

管理员

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

解决方法:

修改mysql目录下的my.cnf文件

vi /etc/mysql.cnf 

[mysqld]
#sql_mode
sql_mode='NO_ENGINE_SUBSTITUTION'

重启MYSQL

systemctl  restart mysqld
0人点赞
Mysql
管理员

全部评论 0

推荐阅读 更多精彩内容

  • mysql 日期区间数据唯一性的实现方法
    mysql 日期区间数据唯一性的实现方法。可以看到,想要实现日期区间唯一性会出现四种情况区间里、包含区间、区间外(左)、区间外(右)。组合这四中情况,查询数据日期区间是否存在数据...
    2021-05-08 10:46:37 管理员