By alexmoreno, 17 December, 2012

Have you ever had a big (and when i say big I mean BIG) database which you need to import in a sql file?

If so, you'll probably have found this issue (or even you are having the problem just now and you are reading this looking for a solution):

ERROR 2013 (HY000): Lost connection to MySQL server

This uses to happen when trying to import the dump with the mysql -u command:

mysql -u root -p database < databasetoimport.sql

You can try to play with the my.ini settings, but a best secure solution is just to do the import from the mysql own console. How? easy.