Skip to main content

How import .sql file to restore MySQL database

Step 1

Make sure to start your localhost Server (XAMPP, WAMP, etc).

Step 2

Open phpMyAdmin in your browser and input necessary credentials to access MySQL Database.

opening phpmyadmin

Step 3

Create a new database and name this newly created database.

creating a new database

Step 4

Import the .sql file into our created database by clicking Import Tab, selecting the file and clicking the Go button below.

importing the sql file

Step 5

Lastly, you will see this messages if the import is successful.

successful database import

I've included in the downloadable of this tutorial a sample .sql file for you to practice.

That ends this tutorial. Happy Coding :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.