- 【现象】
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'zjdx.sentiment_detail_result.classier_rank0'; this is incompatible with sql_mode=only_full_group_by
- 【解决】
mysql 默认开启 ONLY_FULL_GROUP_BY ,关闭 ONLY_FULL_GROUP_BY 即可 (后台SQL语法比较奇葩)。
【修改步骤】
编辑 /etc/my.cnf : 新增配置
[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
【重启mysql】
service mysqld restart