search

Home  >  Q&A  >  body text

【mysql】this is incompatible with sql_mode=only_full_group_by

This is the group by error of mysql5.7. How to solve it in a Mac environment?
There are a lot of Baidu, but it seems that the solution under Mac is not working, please give me some information

迷茫迷茫2826 days ago854

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-24 11:35:12

    sql_model=only_full_group_by限制了,导致在以往MYSQLThe SQL that can be queried normally in version 5.7 cannot be used anymore
    1. sudo cp $(brew --prefix mysql)/support-files/my-default.cnf /etc/my.cnf
    2 Modify sql_mode sql_mode= STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_pISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    3.mysql.server restart

    reply
    0
  • Cancelreply