mysql8.0报错SELECT list is not in GROUP BY clause and contains nonaggregated column

1.查询 show variables like 'sql_mode'
删除ONLY_FULL_GROUP_BY

2.修改mysql安装目录下的my.ini文件:如果只有一个my.ini.txt文件,那就复制一份my.ini.txt创建一个my.ini文件

[mysqld] 设置sql模型 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

3、重启后将永久生效:

posted @ 2020-12-22 15:46  Bashuslovakia  阅读(353)  评论(0编辑  收藏  举报