Backing up a database using mysqldump:

mysqldump -u [username] [dbname] > [dump_filename]

Restoring database from a backup:

mysql -u [username] [dbname] < [dump_filename]

References

Disclaimer: MetinSaylan.com is a participant in the Amazon Associates Program. We earn fees by advertising and linking to Amazon.com. Read more on our privacy policy.