in Web and Tech, Work

Armada: Problem restoring DB from SQL file

As i was trying to replicate the complete database on another production server, I encountered the following error during the import:

MySQL encountered a packet bigger than max_allowed_packet bytes.

Immediately, I saw two approaches to solving this. One is to find the MySQL config file on the server and increase the value of max_allowed_packet bytes or locate the offending query on the SQL file.

As the server was a remote host, I decided to first go with option 2. I found the offending lines to have something to do with the menu_cache table. Although there were only 5 rows to be inserted for the table, each row was storing huge blobs of data. As the records were mainly for caching, I opted to just delete all the entries and simply restore the structure.

Let’s see how this move turns out.

Write a Comment

Comment