How to import large mysql database on wamp server

Is there an easy way to import a large file of .sql

my database to localhost without using it phpmyadmin

? I am using a server WAMP

. Thanks for any help.

+2


source to share


3 answers


If you have console access, you can start mysql directly and just import the file.

something like:



mysql -u username -p database_name < sqlfile.sql

      

+5


source


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



+1


source


I have included the relevant parts from the link provided by Titanfold and modified them for what worked in my current case. Thanks 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 the appropriate place. For example, I added mine after the $ cfg ['blowfish_secret'] line.

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

      

Create a directory named upload in your phpmyadmin directory.

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

      

Then put the large sql file you are trying to import into the new download directory.

Now when you go to the import page in phpmyadmin, you will notice a drop down gift that was not there before - it contains all the sql files in the download directory you just created. Now you can select that and start importing.

0


source







All Articles