Shashi kant Pandidhar
Mysql server has gone away is a very common error which is simply mean the server (mysql) went offline while it was working on something.
This is most commonly noted on executing large sql dump file or running a complex query, in the article we will case one.
my.cnfshould be changed when you need it for business critical applications
sudo nano /etc/mysql/my.cnf
defaults-extra-file (the file specified with –defaults-extra-file=path, if any)
wait_timeout = 600
max_allowed_packet = 64M
sudo /etc/init.d/mysql restart