一、问题描述
采用Navicat连接mysql,在执行SQL时报错
[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
二、问题解决
2.1 问题分析
根据报错看到是sql-mode的值不合理,于是就去看了MySQL的配置文件,发现并没有配置这个参数,那么就是默认的,然后我就去查看我其他MySQL是如何配置的。
2.2 解决方法
①找到MySQL的配置文件my.cnf
(windows是my.ini)
②添加参数:sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
③重启mysql,即可解决