Mysql – Issue with maximum row size in MySQL

MySQL

I have a problem with MySQL, I have a table with many text fields. When I try to store some data I obtain this error.

Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 8126. You have to change some columns to TEXT or
BLOBs

The text that I store in each field is not too long, only a few paragraphs in each one.

What can I do?

Best Answer

Thanks for the people that answer. The links you posted were a very useful base to start learning.

Finally I found this page: http://download.oracle.com/docs/cd/E17952_01/refman-5.5-en/innodb-compression-usage.html

And I configured my.cnf adding these two lines in [mysqld] section:

innodb_file_per_table
innodb_file_format = Barracuda

Then I ALTER my table with this command through phpMyAdmin:

ALTER TABLE nombre_tabla
 ENGINE=InnoDB
 ROW_FORMAT=COMPRESSED 
 KEY_BLOCK_SIZE=8; 
 SHOW WARNINGS;

It is also possible use other settings that you can read in the link above, but these worked good for me.

Related Topic