1、报错信息

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

2、修改配置文件

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

 find / -name "my.cnf"

(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

3、重启mysql使配置生效

service mysqld restart

转载于:https://www.cnblogs.com/yybrhr/p/10158911.html

MySQL报错this is incompatible with sql_mode=only_full_group_by相关推荐

  1. mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by

    在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause ...

  2. mysql升级到5.7版本后,运行程序报错this is incompatible with sql_mode=only_full_group_by

    升级mysql后,运行程序报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains ...

  3. mysql5.7 gruop by报错this is incompatible with sql_mode=only_full_group_by

    解析:在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY cla ...

  4. MYSQL8.0 排序查询报错 this is incompatible with sql_mode=only_full_group_by

    编辑mysql配置文件(windows是my.ini, linux是my.cnf),在 [mysqld]下增加如下配置: sql_mode ='STRICT_TRANS_TABLES,NO_ENGIN ...

  5. MySQL查询出现“this is incompatible with sql_mode=only_full_group_by“错误

    问题 在部署到生产环境的服务器上时,执行原来的SQL语句出现了"this is incompatible with sql_mode=only_full_group_by"错误. ...

  6. mysql查询报错: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 我的情况 : Mysql 5.7.21 版本运行sql 报错如题,同样的 sql 直接本地运行不报错 ...

  7. mysql 报错 sql_mode=only_full_group_by 解决方法

    在服务器数据库查询使用了 GROUP BY 居然报出了 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contai ...

  8. mysql 报错解决思考Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mysql报错: [Err] 1055 - Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggrega ...

  9. MySQL 报错1055

    一.问题描述 SELECT * FROM tbluser GROUP BY sex   当我以这条语句进行数据库查询的时候,报了个错: > 1055 - Expression #1 of SEL ...

最新文章

  1. FreeBSD Top States
  2. Ros知识【09】:功能包介绍
  3. centos web 访问mysql_Centos7安装Web服务器--Mysql5.7.12安装
  4. python db文件_python中查看.db文件中表格的名字及表格中的字段操作
  5. python中astr是啥_python的基本操作
  6. seven days later
  7. iOS 8 Metal Swift教程 :开始学习
  8. [211渣硕] 腾讯/阿里/携程 详细NLP算法实习 面经
  9. tensorflow版PSENet 文本检测模型训练和测试
  10. jieba(结巴)—— Python 中文分词
  11. 10074 启用开发者模式 for vs2015rc
  12. android录音工具,推荐四款十分好用的安卓录音应用
  13. java更新word文档目录页码
  14. 写在25岁的人生边上
  15. Using platform encoding (UTF-8 actually) to copy filtered resources错误
  16. linux 查看 man 路径配置文件 man.config,linux中的man(zz)
  17. Hololens2开发-3-打包编译安装Hololens应用
  18. Flink大数据实时计算系列-案例初体验:HotPages
  19. 极客大学产品经理训练营:产品经理的职业规划 第20课总结
  20. C语言字符串操作函数整理

热门文章

  1. DIV+CSS 让同一行的图片和文字对齐
  2. redis持久化之rdb
  3. 《AFTrans》来自ViT的免费午餐!北大阿里提出用于细粒度视觉识别的自适应注意多尺度融合Transformer...
  4. 滴滴图像技术团队招聘计算机视觉工程师和专家
  5. 重读GhostNet:使用轻量操作代替部分传统卷积层生成冗余特征以减少计算量
  6. GluonCV 升级0.8版,引入深度估计、助力街景分析
  7. 万万没想到,EfficientNet居然这么火!
  8. 提高GAN训练稳定性的9大tricks
  9. AI医疗 | 新开源计算机视觉技术用于新生儿胎龄估计
  10. Markdown编辑公式