参考:https://www.jianshu.com/p/62c769e8d0f0

公司的mysql版本是 8.0.19 

处理步骤:

1、编辑my.cnf文件:

vim /etc/mysql/my.cnf

增加
[mysqld]
sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’

2、重启mysql:sudo service mysql restart

 

my.cnf配置如图:

this is incompatible with sql_mode=only_full_group_by

 

查看sql_mode

mysql> SELECT @@GLOBAL.sql_mode;

 

解决前:

this is incompatible with sql_mode=only_full_group_by

解决后:

this is incompatible with sql_mode=only_full_group_by

相关文章: