com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column 'd.total_rated_power_transformer'; this is incompatible with sql_mode=only_full_group_by

MySQL报错this is incompatible with sql_mode=only_full_group_by

 

2、修改配置文件

 (1)找到配置文件my.cfg

 find / -name "my.cnf"

MySQL报错this is incompatible with sql_mode=only_full_group_by

 (2)修改配置文件

 vi /etc/my.cnf
加一行
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
如果原本有sql_mode,去掉ONLY_FULL_GROUP_BY

 

MySQL报错this is incompatible with sql_mode=only_full_group_by

3、重启mysql使配置生效

service mysqld restart

MySQL报错this is incompatible with sql_mode=only_full_group_by

 

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-12-26
  • 2021-05-06
猜你喜欢
  • 2021-10-27
  • 2021-08-02
  • 2022-02-13
  • 2022-01-19
  • 2021-11-20
  • 2021-12-22
相关资源
相似解决方案