How to enable explicit_defaults_for_timestamp?

First you don’t need to change anything yet.

Those nonstandard behaviors remain the default for TIMESTAMP but as of
MySQL 5.6.6 are deprecated and this warning appears at startup

Now if you want to move to new behaviors you have to add this line in your my.cnf in the [mysqld] section.

explicit_defaults_for_timestamp = 1

The location of my.cnf (or other config files) vary from one system to another. If you can’t find it refer to https://dev.mysql.com/doc/refman/5.7/en/option-files.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)