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

完整错误信息:
ERROR:1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

mysql版本:
mysql最新版5.8没测试过,返回5.7之前的版本都有这个问题。如何解决?

报错说的很清楚。varchar字段占用的空间大于65535,所以减少varchar类型字段的长度,或者分表。
表中有120个字段,基本上都是varchar类型,而且刚开始给的默认值为varchar(255),改为varchar(100),就创建成功了。

猜你喜欢

转载自blog.csdn.net/wang20y8/article/details/88795898
今日推荐