mysql由5.7.22升级5.7.25版本的时候报Err1055异常
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Expression #1 of ORDER BY clause is not in GROUP BY clause and contains
nonaggregated column 'callcenter.CREATETIME' which is not functionally
dependent on columns in GROUP BY clause; this is incompatible
with sql_mode=only_full_group_by
修复方法:
-
首先登陆mysql
mysql -uroot -p
-
登陆后使用命令
SELECT @@sql_mode;
,查看sql_mode
中确实有ONLY_FULL_GROUP_BY
mysql> SELECT @@sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@sql_mode