On my previous tutorial, we’ve learned how to Backup MySQL Database using HeidiSQL into .sql file. Now, we will show you how to restore MySQL Database using HeidiSQL from the .sql backup file. It’s very handy to use HeidiSQL to restore MySQL Database. The good thing about restoring database using HeidiSQL is that we can view the SQL backup file first before executing the actual command.
We can also migrate our MySQL Database from one server to another server using HeidiSQL. Even you know nothing about MySQL coding, you can easily backup, restore or migrate your MySQL database in a minute. You can get all those cool features without having to pay any cents. HeidiSQL is free. Many other administrative tasks such as table editor, create new schema, delete schema, add new users can be done via HeidiSQL. Why you should pay if we can get all of these features for free.
In order to restore MySQL Database using sql file, you will need the following
- sql file (from the backup)
- Login credential to the MySQL Server
- HeidiSQL program
Steps to Restore MySQL Database using HeidiSQL
First, login to the MySQL Server using HeidiSQL and then connect MySQL Server to HeidiSQL. Click File | Load SQL File to open your SQL file. Please refers to our previous post to backup MySQL Database using HeidiSQL in case you need to have sql backup file. Or, you can also use your sql file from mysqldump command.
Once your sql file is opened in HeidiSQL, you can see the content of the backup file like this
Next click Execute SQL button (blue triangle button) or press F9 to execute the restore sql command. In few moments, your database should be restored. Please ensure that there are no errors warning shown.