mysql报错Row size too large. The maximum row size for the used table type, not counting BLOBs, is 6553

时间:2025-03-24 10:00:48

mysql 执行报错

Row size too large. The maximum row size for the used table type, not counting BLOBs, is 6553

原因
数据库编码为utf8mb4,数据库设定的varchar长度:(1000+10000+5000+390)*4>65535了,如果是utf8,则是设定的varchar或者其他类型长度乘以3
表的列 varchar大类型的太多了,超过了mysql数据库的限制

解决办法
将比较长的字段类型设置成text而不是varchar