mysql升级导致group-by-报错

2次阅读

共计 249 个字符,预计需要花费 1 分钟才能阅读完成。

sql 语句报错:SELECT list is not in GROUP BY clause and contains nonaggregated

环境是 ubuntu,mysql 版本 5.7.27,在 /etc/mysql/mysql.conf.d/mysqld.cnf
找到图中的代码


并添加 sql_mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
添加以后:

然后重启 mysql sudo systemctl restart mysql.service

正文完
 0