Saturday, August 30, 2014

How to import a very large MySQL DB to local phpmyadmin (Wamp + Windows)

Unlike in linux OS sometimes you may feel very hard to import a big sized mysql backup to your local machine. So here is an one workaround for that.
  1. First find the config.inc.php file located in the phpmyadmin directory. In my case it is located here: 
    C:\wamp\apps\phpmyadmin3.5.1\config.inc.php
  2. Find the line with $cfg['UploadDir'] on it and update it to: $cfg['UploadDir'] = 'upload'; (Sometimes if you search for the $cfg['UploadDir']  by ctrl+f in that file you may not see it, Just scroll down and find it. Check the image below.
  3. Create a directory called ‘upload’ within the phpmyadmin directory. (C:\wamp\apps\phpmyadmin3.5.1\upload\)
  4. Then place the large sql file that you are trying to import into the new upload directory.
  5. Now go the phpmyadmin of your machine (localhost/phpmyadmin or 127.0.0.1/phpmyadmin/) and go to the db import page
  6. You will notice a new drop down is created there and you can select the placed DB from that drop down (Check the image below).

  7. And then click on GO at the bottom of the import page
That's it guyz :) 

No comments:

Post a Comment