Backup and restore a MySQL database
Oct
18

Backup:

1
2
mysqldump -u user -p database_name > dump.sql
(Enter password)

Restore:

1
2
mysql -u user -p new_database_name < dump.sql
(Enter password)