4128
MySQLERRORNotableHIGH confidence
Row size too large for table definition
Production Risk
Low — DDL fails; no data is affected.
Why it happens
- 1Too many or too wide columns result in a combined row size over 65535 bytes.
- 2Using COMPACT or REDUNDANT row format with large VARCHAR columns.
Fix 1
Use DYNAMIC row format and innodb_strict_mode
Use DYNAMIC row format and innodb_strict_mode
ALTER TABLE t ROW_FORMAT=DYNAMIC;
Why this works
DYNAMIC row format stores large variable-length columns off-page, reducing in-row size.
Fix 2
Convert large VARCHAR columns to TEXT or BLOB
Why this works
TEXT and BLOB columns store data off-page in InnoDB DYNAMIC format, avoiding the row size limit.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 4128 ER_TOO_BIG_ROWSIZE2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev