查询数据时报Syntax error or access violation: 1055 Expression #1 of SELECT list is not

181次阅读
没有评论

查询数据时报 Syntax error or access violation: 1055 Expression #1 of SELECT list is not

错误原因:

这个错误发生在 mysql 5.7 版本及以上版本会出现的问题, 在 mysql5.7 版本默认的 sql 配置是:sql_mode=”ONLY_FULL_GROUP_BY”,这个配置严格执行了 ”SQL92 标准 ”,很多从 5.6 升级到 5.7 时,为了语法兼容,大部分都会选择调整 sql_mode,使其保持跟 5.6 一致,为了尽量兼容程序

解决方法:

找到数据库配置文件 windows 中 my.ini 文件或 linux 中的 my.cnf 文件,在 mysqld 中增加 sql_mode=

然后重启一下 mysql, 搞定。

查询数据时报 Syntax error or access violation: 1055 Expression #1 of SELECT list is not

正文完
有偿技术支持加微信
post-qrcode
 
评论(没有评论)
验证码