mysql 每执行一条sql都报错,解决方案:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

[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;

select VERSION(),@@sql_mode;
我的版本是5.7
sql_mode中包含only_full_group_by,此项意思是。。反正大概就是select的都要group by但是你没有。所以报错
解决方案
我的mysql是解压版的,找到mysql解压目录,

mysql 每执行一条sql都报错,解决方案:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated_第1张图片
image.png

找到my.ini文件加入这句话
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
把only_full_group_by这个值去掉了

你可能感兴趣的:(mysql 每执行一条sql都报错,解决方案:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated)