Export mysql database to .sql file
In this video I have shown how to export a Mysql Database to a .sql file.
-
If you need to take back of a database aml as shown in the image
-
First Open command prompt in Administrator mode.
-
Navigate to the location where you have installed MySQL. In my pc its installed in “C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin”
Navigate to the location by entering the below command.cd "C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin"
-
The command for taking back up is,
mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql
Now in our case to take back up the command will be.
mysqldump -u root -p aml > "C:\Users\MIRITPC\Desktop\jas\aml.sql"
Just copy paste the command into the commad prompt. Now it will ask for your MySQL database. Enter the password and press Enter.
The sql file would have created in the destination we have given. In the “C:\Users\MIRITPC\Desktop\jas” folder.
0 Comments
Comments
Leave a Comment