Skip to content

Instantly share code, notes, and snippets.

@felipebizz
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipebizz/5f2be00340b8ad60ba8f to your computer and use it in GitHub Desktop.
Save felipebizz/5f2be00340b8ad60ba8f to your computer and use it in GitHub Desktop.
How To Backup MySQL Databases on an Ubuntu
#create a Dump
mysqldump -u username -p database_to_backup > backup_name.sql
#Restoring
mysql -u username -p
CREATE DATABASE database_name;
exit
mysql -u username -p database_name < backup_name.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment