markme
markme

Reputation:

How to import large mysql database on wamp server

Is there an easy way to import a large .sql file of my database on local host without using phpmyadmin? I am using the WAMP server. Thanks for any help.

Upvotes: 3

Views: 10892

Answers (3)

Ian
Ian

Reputation: 2630

I have included the pertinent parts from the link provided by titanfold and modified them for what worked in my current case. Thank you to daipratt.co.uk for the original information.

Find the config.inc.php file located in the phpmyadmin directory. For example:

C:\wamp64\apps\phpmyadmin4.8.4\config.inc.php

Add the following line in an appropriate place. I added mine after the $cfg['blowfish_secret'] line for example.

$cfg['UploadDir'] = 'upload';

Create a directory called 'upload' within the phpmyadmin directory.

C:\wamp64\apps\phpmyadmin4.8.4\upload\

Then place the large sql file that you are trying to import into the new upload directory.

Now when you go onto the import page within phpmyadmin, you will notice a drop down present that wasn’t there before – it contains all of the sql files in the upload directory that you have just created. You can now select this and begin the import.

Upvotes: 0

atik
atik

Reputation: 11

You can work around the limitations of PhpMyAdmin: http://daipratt.co.uk/importing-large-files-into-mysql-with-phpmyadmin/comment-page-4/#comment-63552

Upvotes: 1

Quintin Robinson
Quintin Robinson

Reputation: 82375

If you have access to the console you can run mysql directly and just import the file.

something to the effect of:

mysql -u username -p database_name < sqlfile.sql

Upvotes: 7

Related Questions