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.
To change the mode
This can be done in two ways:
Find:
Code:
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Replace with:
Code:
# Set the SQL mode to strict
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Or
Code:
SET @@global.sql_mode= ‘‘;
导入转储文件的时候:Error Code: 1406. Data too long for column - MySQL
原文:http://www.cnblogs.com/zhangwufei/p/6994546.html