Help Center/ Relational Database Service/ Troubleshooting/ RDS for MySQL/ SQL Issues/ "Row size too large" Reported When an RDS for MySQL Table Failed to Be Created
Updated on 2023-03-06 GMT+08:00

"Row size too large" Reported When an RDS for MySQL Table Failed to Be Created

Scenario

An RDS for MySQL table failed to be created and the following information is displayed:

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

Fault Analysis

The total length of the varchar fields exceeds 65535, resulting in a table creation failure.

Solution

  1. Reduce the length.
    CREATE TABLE t1 (a VARCHAR(10000),b VARCHAR(10000),c VARCHAR(10000),d VARCHAR(10000),e VARCHAR(10000),f VARCHAR(10000) ) ENGINE=MyISAM  CHARACTER SET latin1; 
  2. Change a column to TEXT by referring to the official documentation.