mySQL: How to backup/restore SQL databases through SSH

To backup your database through SSH (create SQL dump):
mysqldump --opt -u user -p dbname > {path}/backup.sql

To restore:
mysql -u user -p dbname < {path}/backup.sql

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.