which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod
Posted 年少~年
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod相关的知识,希望对你有一定的参考价值。
编辑
vim /etc/my.cnf
在文件底部加入:
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
重启:systemctl restart mysqld 结果不成功 ,
查看错误原因
cat /var/log/mysqld.log
/usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
原因:8.0以上已经取消了NO_AUTO_CREATE_USER这个关键字,在mysql.ini中的sql_mode中删掉这个关键字即可。
最终配置
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
以上是关于which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod的主要内容,如果未能解决你的问题,请参考以下文章
which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod
JAVA错误提示:The operation is not applicable to the current selection.Select a field which is not declar
解决“requires XXX which is not installed“
Called attach on a child which is not detached