When I need to upload large .sql file (greater than 10 MB) into MySQL using phpMyAdmin, it frequently times out.
The annoying the solution is to split the SQL file into several smaller file, but text editors will hang up if the file is too large, and if you aren’t careful you can break the whole script.
That is why I like David Pratt’s solution. It worked great.
1. If you have phpMyAdmin installed in CPanel, you need to login to your server using your root password. Navigation to the folder:
2. There, create a directory “upload”.
3. Next, look for config.php and change the line:
$cfg['UploadDir'] = '';
$cfg['UploadDir'] = 'upload';
4. Save the file, and upload your .sql script into that upload directory.
5. Now when you go to the import tab in your phpMyAdmin, you will have a new option under “File to Import”, called “Or web server upload directory”.
6. Select the file you uploaded from the drop down menu.