Importing Large Database to Wamp Server

Importing Large Database to Wamp Server

It is obvious that most of us do website development in local server in terms of CMS like WordPress. I do that also. Few days ago i was working with a client site that has a big database. Which I need to copy into my local server and redesign the site. Then I export that database from his Cpanle but I couldn’t install it to my local Wamp Server. At that point I found the below solution which works great.

1) Open the php.ini file:
Click Wamp Server >PHP >php.ini
Find and change the following lines:
upload_max_filesize = 100M
post_max_size = 100M
2) Restart Apache Server.
3) Try importing the file

You may get the following error uploading a large file:
Set timeout
Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin2.11.6\libraries\import\sql.php on line 118

4) Open C:\wamp\apps\phpmyadmin\
a) Near line 128 you can change the time for which phpmyadmin will execute
b) Change the number.
$cfg[‘ExecTimeLimit’]           = 300;    // maximum execution time in seconds (0 for no limit)
$cfg[‘ExecTimeLimit’]           = 10000;    // maximum execution time in seconds (0 for no limit)
5) Restart All Services

More Options:

6) a) Open:
my.ini located in C:\wamp\bin\mysql\mysql5.0.51b\my.ini
b) Add the code:
max_allowed_packet = 200M

7) Open:
Look for:
$cfg[‘UploadDir’] = ”;
Change to:
$cfg[‘UploadDir’] = ‘upload’;

8) Create a directory called ‘upload’ in:
Copy and Paste sql file to:

9) Restart All Services


Those are the options that will work for you. So do it and enjoy

Leave a comment