Reputation: 3064
I am using lando
for my WordPress local setup.
Lando offers a CLI based database import capability. The steps to use the command are:
$ lando start
$ lando db-import data.sql
Documentation: https://docs.lando.dev/guides/db-import.html
But, the above command always fails with the following error message:
ERROR 2006 (HY000) at line 654: MySQL server has gone away.
I went through various articles and all are saying that the above error appears if the SQL file is too big or there is a large query in it. According to their suggestions, I added the following lines in my.cnf file and restarted MySql service.
[mysqld]
wait_timeout = 28800
interactive_timeout = 28800
max_packet_size = 128M
However, the result is still the same.
I am on Ubuntu 22.04
I have at least 9 websites setup at my local use lando
and none of them have this issue. Which leads me to think that the problem might not be global and may be site specific. Could there be a chance that the database dump got corrupted?
NB: There are several posts in Stack Overflow mentioning the same issue. I tried all workarounds that go with Ubuntu. However, nothing had worked.
Upvotes: 0
Views: 157