Mysql5.7版本sql错误:this is incompatible with sql_mode=only_full_group_by

1、获取 mysql 配置文件路径
mysqld --help --verbose | less

2、在 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'

3、获取 mysql 服务路径(mac)
sudo find / -name mysql.server

4、重启 mysql
mysql.server restart

发表评论

电子邮件地址不会被公开。

This site uses Akismet to reduce spam. Learn how your comment data is processed.