Skip to content

Instantly share code, notes, and snippets.

@nitsx2
Created October 10, 2018 11:31
Show Gist options
  • Save nitsx2/5cdbf552f021297c898845d010481600 to your computer and use it in GitHub Desktop.
Save nitsx2/5cdbf552f021297c898845d010481600 to your computer and use it in GitHub Desktop.
dump mysql
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 ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment