Reputation: 865
First of all I already checked this question in previous posts, the answers given there didn't work for me, that's why I'm trying to get a functional answer with this post.
I'm trying to import a 8GB backup file into mySQL using:
mysql.exe -u root -p -h localhost dev8 < C:\dev8.sql
After 20 minutes processing it says:
ERROR 2006 (HY000) at line 8465: MySQL server has gone away
And yes, I changed the max_allowed_packet using a very very large number in /bin/my, it didn't work so I changed it also in my-huge, my-innodb-heavy-4G, my-large, my-medium.
I also changed the phpmyadmin config file setting it to the same value. It didn't work either.
Any suggestion?
Upvotes: 0
Views: 336
Reputation: 1333
Use exorbitant values for max_allowed_packet and wait_timeout. I mean, usually you should use a value that is 2 times the size of your import file, so if your import file is 8GB your max_allowed_packet should be at lease 16GB. Also increase to a really high number your wait_time_out.
A personal recommendation: Change these values directly in the tables, I mean, log in as a root into mysql and make the changes. I had the same problem before and just changing the text files was not enough, for me it didn't work until I changed the values in the db.
Upvotes: 2