Monday 6 August 2018

How to export and import a mysql database using Command Prompt

                                  If you have a large database and you want to export which is not exported by phpmyadmin default export option. because it shows some maximum limit or time expired. For that you can try importing and exporting any size database of phpmyadmin using Command prompt.

Command for import and export:

       1. open cmd
       2. set mysql path in cmd

            set path=c:\wamp\bin\mysql\mysql5.6.17\bin

       3. For database export (Backup)
           
           mysqldump -u YourUser -p YourDatabaseName > filename.sql

       4. For database import (Restore): 

            mysql -u YourUser -p YourDatabaseName < filename.sql



          you can change your set path command as per your xampp,wampp etc.

No comments:

Post a Comment

The Future of Remote Work, According to Startups

  The Future of Remote Work, According to Startups No matter where in the world you log in from—Silicon Valley, London, and beyond—COVID-19 ...