How to Restore MySQL Database from a Backup File?

How to Restore MySQL Database from a Backup File?

How to Restore MySQL Database from a Backup File?

In this article you will learn 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.sql
2. Example:

mysql -h localhost -u root -p72aDufi8 db01 < thedumpfile.sql

Get Notifications Via Email