Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

Finally I found this page:

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

innodb_file_format = Barracuda

Then I ALTER my table with this command through phpMyAdmin:

ALTER TABLE nombre_tabla

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

share|improve this answer

You may want to take a look at this article which explains a lot about MySQL row sizes. It's important to note that even if you use TEXT or BLOB fields, your row size could still be over 8K (limit for InnoDB) because it stores the first 768 bytes for each field inline in the page. The simplest way to fix this is to use the Barracuda file format with InnoDB. This basically gets rid of the problem altogether by only storing the 20 byte pointer to the text data instead of storing the firs 768 bytes.

share|improve this answer

Well, do as mysql says: convert big fields from varchar to text or blob (ALTER TABLE). text fields behave much like varchar (indices needs prefix length, but nevertheless work), but are stored separately.

This reference tells you the exact limits of every stock mysql table engine:

And here's everything to know about text fields:

share|improve this answer
Thanks @korkman for your answer, my fields were already defined as text when the problem ocurred. I'm going to watch your link suggestions. – Memochipan Nov 2 '11 at 0:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.