MySQL Error: Data truncated for column ‘…’ at row 0

If you’ve recently migrated from MySQL 4 to MySQL 5, queries that used to work might cause errors. The thing is that MySQL got much more struct about what data can go where. MySQL 4 used to cast NULL values to 0 INT, DOUBLE, FLOAT etc implicitly. MySQL 5 doesn’t do it so you ether need to make the column you are trying to assign to NULLable or make sure that it is never assigned NULL value.

Leave a comment

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