How to mysqldump and mysql to backup and restore a database:
Backup to .sql file
1 |
mysqldump -u DATABASE_USER –p DATABASE_NAME > DATABASE_NAME.sql |
Restore from .sql file
1 |
mysql -u DATABASE_USER –p DATABASE_NAME < DATABASE_NAME.sql |
Suggested to run the command in database server to get the fastest speed.