[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).[Warning] 'ERROR_FOR_DIVISION_BY_ZERO' is deprecated and will be removed in a future release.[Warning] 'NO_ZERO_DATE' is deprecated and will be removed in a future release.[Warning] 'NO_ZERO_IN_DATE' is deprecated and will be removed in a future release.
TIMESTAMP with implicit DEFAULT value is deprecated.
在MySQL配置文件my.ini或者my.cnf中的[mysqld]段落中添加一行
explicit_defaults_for_timestamp=true
如果在MySQL配置文件中指定了sql_mode并且使用了ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE,NO_ZERO_IN_DATE三者中的一个以上,则分别会报出已经不建议使用,以前将移除的错误信息。解决问题的方法,就是将他们全部从sql_mode中去掉。
sql_mode=“ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES”
来源地址:https://blog.csdn.net/qq_39689711/article/details/124865899