SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'dtdate' 解决方法

小微OA
ERR: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'mime' at row 1


原因是:插入字段长度超过设定的长度
解决方法:

在my.ini里找到sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
把其中的STRICT_TRANS_TABLES,去掉,或者把sqlmode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
注释掉,然后重启mysql就ok了

原文地址:https://www.cnblogs.com/yzycoder/p/6064101.html