How to Restore MySQL Database from a Backup File? |
There may be many reason because of which you have to restore your MySQL Database. Here is a way by which you can Restore MySQL Database from a Backup file.
Important Note: I recommend you to test this method before applying to your database to make sure that your database backups are working correctly.
How to Restore MySQL Database from a Backup File?
1. Syntax of Code:
mysql -h hostname -u username -pthepassword databasename < dumpfile.sql2. Example:
mysql -h localhost -u root -p72aDufi8 db01 < thedumpfile.sql