error:1055 ,sql_mode=only_full_group_by的处理方式

xjfeng 阅读:2074 2024-06-25 08:56:22 评论:0

Mysql版本升级到5.7.20版本后,查询的时候出现如下报错:

1055, "Expression #2 of SELECT list is not in GROUP BY 
clause and contains nonaggregated column 'xx' which is not functionally dependent on columns in GROUP BY clause; 
this is incompatible with sql_mode=only_full_group_by"

解决方式:

用root账户登录:

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));


本文 Xjfeng.Com 原创,转载保留链接!网址:https://www.xjfeng.com/post/5.html

标签:mysql
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

搜索
排行榜
关注我们

扫一扫关注我们,了解最新精彩内容