The above error you may have encountered when importing a large SQL file. This error occurs frequently along with bundled software like xampp when you try to import a large sql file via phpmyadmin
#2006 - MySQL server has gone away
Solution:
The solution is to change the wait_timeout settings in mysql.cnf and in different systems you can find it different locations
On Debian
etc/mysql/my.cnf
In XAMPP
And then change these settings under the file and save it. Then restart the My SQLserver
max_allowed_packet = 64M
innodb_lock_wait_timeout = 500
Once you restart the server, it will allow you import a file with size more than 64M and change the timeout to max timeout of your choice