What I wanna do is to update the field comment_author and change the type from tinytext to varchar(100)

For some reason it complains about "Invaild default value for 'comment_date'"

Why does it complain when I'm not even trying to change it? The command I'm using is:

 `mysql> Alter TABLE `wp_comments` MODIFY COLUMN `comment_author` VARCHAR(100);` 

enter image description here

enter image description here


  • I'm voting to close this question as off-topic because this is not about magento
    – Marius
    Commented Feb 11, 2020 at 20:17

1 Answer 1


Strict mode affects whether the server permits '0000-00-00' as a valid date: If strict mode is not enabled, '0000-00-00' is permitted and inserts produce no warning. If strict mode is enabled, '0000-00-00' is not permitted and inserts produce an error, unless IGNORE is given as well. For INSERT IGNORE and UPDATE IGNORE, '0000-00-00' is permitted and inserts produce a warning.

reference: https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime

Not the answer you're looking for? Browse other questions tagged or ask your own question.