报错:’NO_ZERO_DATE’, ‘NO_ZERO_IN_DATE’ and ‘ERROR_FOR_DIVISION_BY_ZERO’ sql modes should be used with strict mode.

2020年1月8日 | 分类: 【技术】

MySQL日志路径:/var/log/mysql/error.log

出现报错:

2020-01-08T03:46:57.107598Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-01-08T03:46:57.107685Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2020-01-08T03:46:57.107723Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

参考:https://amon.org/whmcs-install
参考:http://www.2cto.com/database/201311/256093

参考:https://blog.csdn.net/wyzxg/article/details/8787878

WHMCS requires MySQL strict mode to be turned off in order for it to function.

那么关闭 Strict Mode :编辑 MySQL 配置文件:/etc/my.cnf

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

重启 mysql 服务,生效配置:

systemctl restart mysqld