Incorrect datetime value: ‘0000-00-00 00:00:00’ for column

  • Get SQL_MODE :SHOW VARIABLES LIKE ‘sql_mode’;

Result:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

  • Remove on the result :NO_ZERO_IN_DATE,NO_ZERO_DATE
  • Set new configuration :set GLOBAL SQL_MODE=’ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’

Leave a Reply

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