Has MySQL/MariaDB server ever run away from you? If it hasn’t, you’re lucky or you’re likely to use PostgreSQL instead.
Today I’m trying to restore a database from backup (database dump) onto a new MariaDB server. This is what happened:
The database size is 1.7G, and this should not surprised a database administrator. But it did surprise me because: firstly I’m not a db admin, and secondly I had this issue before just a few weeks ago. So here is a blog post to make sure I won’t forget it for the 3rd time. Basically, I just need to increase the
max_allowed_packet size from the default 16MB to something bigger. I chose 128MB.
/etc/my.cnf.d/server.cnf for MariaDB 5.5 on Red Hat Enterprise Linux 7 as the following:
MariaDB server should be restarted, then let’s try to restore the database from backup again:
It seems to work.