mysql5.7报错this is incompatible with sql_mode=only_full_group_by

1、查看sql_mode

|

01

|

select @@global.sql_mode;

|

查询出来的值为:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

2、去掉ONLY_FULL_GROUP_BY,重新设置值。

|

01

|

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';

|

3、上面是改变了全局sql_mode,对于新建的数据库有效。

http://www.jfinal.com/share/1451

你可能感兴趣的:(mysql5.7报错this is incompatible with sql_mode=only_full_group_by)