Backup and Restore a Database via Command Line SSH

Sep 03, 2013 13:39

BACKUP

# mysqldump -u root -p "YOUR_PASSWORD" DATABASE_NAME > filename.sql

*** if you need to backup all databases change out DATABSASE_NAME with…

--all-databases

RESTORE

# mysql -u root -p "YOUR_PASSWORD" DATABASE_NAME < filename.sql

*** if you need to restore all databases remove DATABSASE_NAME from the command above

ssh, mysql, restore, backup

Previous post Next post
Up