Skip to content

Instantly share code, notes, and snippets.

@asifsaho
Forked from milon/mysql-backup_restore.md
Last active June 22, 2020 20:06
Show Gist options
  • Save asifsaho/2be88105b5af84e1bec75561a7b7eb8c to your computer and use it in GitHub Desktop.
Save asifsaho/2be88105b5af84e1bec75561a7b7eb8c to your computer and use it in GitHub Desktop.
Mysql: Backup and Restore

#Mysql: Backup and Restore

Mysql Backup and restore through command line.

Backup

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
mysqldump -u root -p --all-databases > alldb.sql

##Restore

mysql -u root -p[root_password] [database_name] < dumpfilename.sql

mysql -u root -p < alldb.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment