问题描述
日志报数据库连接异常:
数据库.err日志(数据库的data下面)显示:
[Note] InnoDB: Database was not shutdown normally!
[Note] InnoDB: Starting crash recovery.
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
解决办法
在5.6版本以后有这么一项检查,所以要开启标准的 explicit_defaults_for_timestamp功能,但是默认是关闭的。
在my.cnf中加入:
[mysqld]
explicit_defaults_for_timestamp=true
重启数据库。