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

Excel Formula's (Regular & Job-Oriented)

 Excel Formula's  1) SUM Task: Sum of numbers Formula: =SUM(A1:A10) Example: Sum of all numbers in A1–A10 2) AVERAGE Task: Average Formu...