SQLSTATE[42000]: Syntax error or access violation

位置:首页 / 新闻中心 / 知识教程

知识教程 Admin 2024-02-23 15:02:47 2363
mysql在5.5版本下开发的项目放在mysql 5.7项目下报错:
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'kuguan.a.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

错误原因:
研究发现,mysql 5.7 比5.5和5.6版本的数据模式更加严谨导致的错误

解决办法:
需要在mysql 5.7下配置数据模式。
NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

以上就是“SQLSTATE[42000]: Syntax error or access violation”的详细内容,更多请关注木子天禾科技其它相关文章!

以上就是“SQLSTATE[42000]: Syntax error or access violation”的详细内容,更多请关注木子天禾科技其它相关文章!

15934152105 扫描微信