June 13, 2010
How to export a mysql database using Command Prompt?
Question by Starx
I have a database it is quite larger so I wanted to export it using Command Prompt, but I dont know how to.
Please help
I am using WAMP
Answer by Starx
Ok,
First check if your DOS recognizes mysql command. If not go to command and type in
set path=c:wampbinmysqlmysql5.1.36bin
(I just made a guess, since you are using WAMP)
Then use this command to export your database
mysqldump -u youruser -p userpassword yourdatabase > wantedsqlfile.sql
This exports the database to the path you are currently in, while executing this command
Here is some detail instruction regarding both import and export
http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/#more-184