Last Updated: February 25, 2016
· rshetty

MySQLDump of your Database

Want to backup your MySQL database ?

MySQL provides a tool for dumping your database.

Use this command in your Rails Application.

mysqldump -uroot -p DB-NAME > backup.sql

DB-NAME is the name of your database.
This dumps your sql data into backup.sql file.

Then using this .sql file you can restore your data in any other of your Rails Application.

Restore as

mysql -uroot -p DB-NAME < backup.sql

Happy Hacking ....