When I was trying to import a large sql file (about 11MB) in phpMyAdmin, I got "Error 2006: MySQL server has gone away". Solution to the above error in XAMPP is as follows: In xampp\mysql\bin\my.ini file, set max_allowed_packet to something like 10M or 20M (larger than the sql file you are trying to import) Save the file and restart Apache and MySQL servers. That should do it. There is no need to make changes to php.ini in this case. However, if you need to import even larger file (say 4GB) , then you will need to modify both my.ini and php.ini file. For modifying xampp\mysql\bin\my.ini , follow the steps as above to set max_allowed_packet = 4GB. Then modify xampp\php\php.ini , set post_max_size = 4G upload_max_filesize = 4G Save the files and restart Apache and MySQL servers.