this is incompatible with sql_mode=only_full_group_by错误解决

Posted 爱米酱

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了this is incompatible with sql_mode=only_full_group_by错误解决相关的知识,希望对你有一定的参考价值。


今天在主机上运行代码的时候发现了

this is incompatible with sql_mode=only_full_group_by

这样的错误,经过一番排查,最终发现原因是主机上的数据库是新安装的,版本为5.7,而该版本默认拥有sql_mode=only_full_group_by,所以需要进行调整:

vi /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 mysql restart

我们可以通过,语句查询相关设置是否成功

select @@sql_mode;

以上是关于this is incompatible with sql_mode=only_full_group_by错误解决的主要内容,如果未能解决你的问题,请参考以下文章

yarn错误The engine "node" is incompatible with this module

错误:this is incompatible with sql_mode=only_full_group_by

e engine “node“ is incompatible with this module. Expected version “0.8.x“. Got “16.13.2“

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: ..... this is incompatible with sq

This version of android studio is incompatible with the gradle version used.Try disabling the instan

mysql报错this is incompatible with sql_mode=only_full_group_by