Error Code: 1055 incompatible with sql_mode=only_full_group_by

后端 未结 6 1326
予麋鹿
予麋鹿 2020-12-01 05:49

I have been having issues switching to an offline version of the Lahman SQL baseball database. I was using a terminal embed into an EDX course. This command runs fine on the

6条回答
  •  广开言路
    2020-12-01 06:26

    You can set the variables in mysql:

    mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    

    Remember NO_AUTO_CREATE_USER will not work with mysql 8.

    If that doesn't work just do:

    mysql > set sql_mode = ''
    

提交回复
热议问题