Question
I am trying to import a 15 MB mySQL DB in phpMyAdmin but I get an error. How can I fix this?
This is the error I get:
#1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
I searched the error and found some people talking about adding this to /etc/mysql/my.cnf
innodb_log_file_size = 512M
I did that and restarted Apache but I still get the error. I’ve also updated my php.ini file with:
memory_limit = 600M
I’m running a 1GB / 30GB Disk Ubuntu droplet. Is there something I am missing?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
That doesn’t sound like a problem with phpMyAdmin.
If you created database in advance before importing, make sure that it’s the same engine (InnoDB, MyISAM) as original one.
When changing your my.cnf you’ll need to restart the MySQL service, restarting apache will have no effect:
@ryanpq That’s probably my issue but when I run the restart I get this:
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
When I run
systemctl status mysql.service
I see this:What is the
preceding group
that is being referred to?@ryanpq Ok, I found out what groups are and added this to my.cnf:
This allowed me to restart mySQL successfully, however, I am still getting the error.
The specific error you ran into isn’t one I’ve encountered before myself but doing some searching led me to this Stackoverflow thread which included an answer that worked for another user who encountered the “Row size too large” error you’re seeing.
I tried adding this to my.cnf:
I also altered the table to use
ROW_FORMAT = COMPRESSED
.Unfortunately this did not work. I exported a copy of my DB without any content (just the structure) and tried importing that. When I tried that, I got the same error regarding row size. I only have a single table but it has 163 columns. I don’t understand why the error is regarding row size when I’m not even importing any rows!
I’ve set most of them to be
TINYTEXT
, thinking that would use less memory thanVARCHAR
, but that doesn’t seem to matter.