Fix – ERROR 2006 (HY000) while importing database in MySQL

While importing big database in MySQL, you might get the error as shown below:

ERROR 2006 (HY000) at line 3387 in file: 'path_to_the_db_dump.sql': MySQL server has gone away

Step 1:

Open a terminal and find a config file for MySQL by command locate my.cnf.

You will get the list of files. Open your responsible file.

If you don’t know the responsible file then open all the files ;). There is no harm to add our solution in all the related config file.

Step 2:

Add following line to my.cnf file.

max_allowed_packet=64M

Restart your MySQL using below command.

sudo service mysql restart 
OR
brew services restart mysql

That’s it!!!!

Related Articles

Fix 404 error on nginx

Sometimes you get unexpected 404 error from Nginx server. And I am going to tell you how I fixed the issue. You can fix that…

Fun @ WordCamp Pune

In my previous blog First WordCamp, I covered what we have done in WordCamp. Now in this blog, you will know what fun we did…

WordCamp Mumbai

Whooaaaaaaaaa…!!!!!!!!!!!! Mumbaaaaaaaaiiiiiiiiiiiiiiiii…………………………………… Mayanagari…….. This was my 2nd WordCamp and it was at Mumbai. This WordCamp was like medicine for me as I had some problems…

The last day ( છેલ્લો દિવસ )

Hi there, The last day, yes I am talking about the last day of the year 2016. Another year passed and I became 26 in…

Fix – ERROR 1031 Table storage engine for ‘table_name’ doesn’t have this option

Sometimes you get the below error while importing the database. ERROR 1031 (HY000) at line 5643 in file: ‘/Users/username/Downloads/database.sql’: Table storage engine for ‘table_name’ doesn’t…

Responses

Leave a Reply