美文网首页
error:1055 ,sql_mode=only_full_g

error:1055 ,sql_mode=only_full_g

作者: 酱油攻城狮 | 来源:发表于2017-12-28 14:47 被阅读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',''));
    

    相关文章

      网友评论

          本文标题:error:1055 ,sql_mode=only_full_g

          本文链接:https://www.haomeiwen.com/subject/bdcvgxtx.html