Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
We recently migrated a client website to a new server and encountered the following error when trying to import their database:
ERROR 1118 (42000) at line 2663: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
We tested on the old server but didn’t get this error, we checked the version and it was running MariaDB 10.1. We had installed MariaDB 10.4 on the new server because 10.1 was EOL’ed and since 10.2 strict mode had been enabled by default.
The fix to this is relatively simple, that is, if you do not want to make any changes to your dataset or database structure. Locate and edit the mysql config file, on CentOS this is located at /etc/my.cnf.d/server.conf and under [mysqlnd] add the following line:
innodb_strict_mode = 0
Next you need to restart mysql:
service mariadb restart
That’s it, you’re done!