Disable ONLY_FULL_GROUP_BY

后端 未结 27 1310
既然无缘
既然无缘 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 01:13

    Solution 1: Remove ONLY_FULL_GROUP_BY from mysql console

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

    you can read more here

    Solution 2: Remove ONLY_FULL_GROUP_BY from phpmyadmin

    • Open phpmyadmin & select localhost
    • Click on menu Variables & scroll down for sql mode
    • Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save.

提交回复
热议问题