How import .sql file to restore MySQL database

Submitted by: 
Language: 
Visitors have accessed this post 3185 times.

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 :)


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.