MySQL 5.7 default dateTime mode, zero dateTime is not allowed.
Since 0000-00-00 00:00:00
is not a valid DATETIME
value, your database is broken. That is why MySQL 5.7 – which comes with NO_ZERO_DATE
mode enabled by default – outputs an error when you try to perform a write operation.
So a solution to solve this error by reset the mode, i.e.
SET SQL_MODE='ALLOW_INVALID_DATES';
No comments:
Post a Comment