Data truncation: Data too long for column 'content' at row 1 Query

Posted March 28, 2021 310 views

database mysql8

How to set SQL MODE fix this error?

MySQL will truncate any insert value that exceeds the specified column width.
to make this without error try Switch your MySQL mode to not use STRICT.


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

You can set the SQL mode by finding the cluster on the Databases page -> click the cluster’s name -> Settings tab - > Global SQL mode -> Edit button -> from the drop-down menu select the SQL mode you want to modify

Save to persist the change or cancel to revert.

The link provides more information on how to set global SQL mode on MySQL clusters.

Hope that this helps!