[Solved] MYSQL database adds timestamp field error: Invalid default value for’xxx’

Solution:

Add the following configuration under the mysql configuration file /etc/my.cnf. Add under the
[mysqld] node.
explicit_defaults_for_timestamp = ON
Restart the mysql database and try the configuration to take effect.

Restart command service mysqld restart

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *