Getting the dreaded error #2006 – MySQL server has gone away while importing files into phpmyadmin?This guide will help you step by step to solve the issue.
- Open my.ini or my.cnf (mysql config file)
- Make sure your max_allowed_packet = 64M is set to a larger value (default is 1MB).
- Save and restart MySQL
- Open your php.ini file
- Make sure the max file names are larger than the filesize of the file you are trying to upload to phpMyAdmin:post_max_size = 64Mupload_max_filesize = 64M
- Save the php.ini changes and restart Apache
- Open your phpMyAdmin Configuration file – PMA_path/libraries/config.default.php
- Check $cfg['ExecTimeLimit'] – the value of this variable should be greater than its default value of 300 seconds.