linux下 java.sql.SQLSyntaxErrorException: In aggregated query without GROUP BY, expression this is incompatible with sql_mode=only_full_group_by解决办法

永久解决办法,重启任然生效 

1.登录linux服务器

2.找到my.cnf 文件

3.vim /etc/my.cnf

分别在[mysqld]和[mysql]下面添加这段 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

4.重启mysql  /usr/local/mysql/support-files/mysql.server restart 

posted on 2020-08-20 16:19  大孟子  阅读(1458)  评论(0编辑  收藏  举报

导航