TECHIES WORLD

For Techs.... Techniques.... Technologies....

ApacheMysqlPHPWindows

How to import MySQL dump in Windows

We can import MySQL dump in Windows through the phpmyadmin application provided by WAMP softwatre. But if the size of the dump file is large, it will throw error on importing via phpmyadmin.

In such cases we can import it from the Windows cmd terminal. This aricle explains the steps to import MySQL dump file thorugh Windows command line.

Step1: Open the command line.

Click Windows + r, type cmd and enter

Step2: Change the current location to MySQL binary folder.

D:\wamp64\bin\mysql\mysql5.7.11\bin\

Step3: Restore the dump file.

mysql -u root -p database < full-path-to-dump.sql

Here we need to replace the database name and full-path-to-dump.sql accordingly.

Step4: We can take the backup of database in the same way itself.

mysql -u root -p database > full-path-to-dump.sql

Here we need to replace the database name and full-path-to-dump.sql accordingly.

That's all…

Leave a Reply