I apologize if there has been a similar post .
I have been having problems importing very large mysql script files using phpmyadmin. And I mean files larger than 50MB. PHPMyadmin tends to timeout especially if you are on a slow connection when using the import script file form. The default timeout is 300 seconds, so if you do not finish the http upload within that time frame, the script will time out (correct me if I'm wrong in this).
Anyways, I found an alternative:
1. Download phpmyadmin from http://www.phpmyadmin.net/home_page/downloads.php
2. Extract and FTP it to a subfolder in your site.
3. Log in to your control panel (Plesk or cPanel). In the Databases section, create a new MySql database. Then create a new MySQL user account that will have access to the database you created.
3. Create a file named config.inc.php. Open this file and paste the following code:
/* Servers configuration */
$i = 0;
/* Server localhost (config:root)  */
$cfg['Servers'][$i]['host'] = 'localhost'; //our mysql host server
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'user'; //change this to MySQL user name you have created
$cfg['Servers'][$i]['password'] = 'pass'; //the mysql user password
$cfg['UploadDir'] = 'imports'; //the all important setting. explained below
/* End of servers configuration */
The variable $cfg['UploadDir'] is name of the directory where SQL files have been uploaded by other means than phpMyAdmin (for example, ftp). If for example, you have uploaded phpmyadmin to http://mydomain.com/pma
, create a subfolder under pma
4. Upload config.inc.php to your phpmyadmin folder. Using your web browser, check if you have typed the correct settings. E.g. browse http://mydomain.com/pma
. If the database you have created shows up, then we're good!
5. Upload your large mysql dump file to the folder name which you have specifed in $cfg['UploadDir']. In this case, the folder is imports
6. After upload is done. Check your uploaded phpmyadmin in your browser. On the left frame, above the databases drop down menu, there are 4 icons: Home, Query Window, PhpMyadmin docu & MySQL docu. Click on the Query Window icon. A pop up window will show up where you can run sql queries. There is also an Import Files
tab on this window. Click on it and you will see a drop down on the right side with a label web server upload directory:
If you click on the dropdown, you will see the sql file you have uploaded in the imports
Click the Go
button and phpmyadmin will import the file.
-Do password protect your phpmyadmin directory.
-Make sure that your target database is the one active in the main phpmyadmin window before importing.