修改,my.cnf文件为以下内容,然后重启服务即可
#只取消group by 的严格模式
[client] default-character-set=utf8mb4
[mysql] default-character-set=utf8mb4
[mysqld] sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION character-set-server=utf8mb4
#或者
#取消 group by 和 date zore 严格模式
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld]
sql-mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
character-set-server=utf8mb4