Disable ONLY_FULL_GROUP_BY

后端 未结 27 1965
既然无缘
既然无缘 2020-11-22 00:22

I accidentally enabled ONLY_FULL_GROUP_BY mode like this:

SET sql_mode = \'ONLY_FULL_GROUP_BY\';

How do I disable it?

27条回答
  •  忘掉有多难
    2020-11-22 00:59

    For MySql 8 you can try this one. (not tested on 5.7. Hope it also works there)

    First open this file

    sudo vi /etc/mysql/my.cnf and paste below code at the end of above file

    [mysqld]
    sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
    

提交回复
热议问题