What is a Database?

Simply a database is an organized collection of data.

What is Localhost?


When developing websites, there are two main places where you are going to work.
First one is web server. Web server is the computer that broadcasts web page and its content the Internet. We can create a database in web server.

Second one is local machine, such as laptop or desktop computer. Web developers usually use it to develop and test run sitesThis is commonly called  localhost.

However, personal computer is not a server. So, We have to run a web server on our machine. 
Let's see how to create a database in localhost step by step.



Step 1 - Install a server to your computer.


XAMPP server can be download and install Windows / Mac / Linux from XAMPP Homepage.

Install it using the install wizard.

Step 2 - Run XAMPP Server and make sure Apache and MySQL running.



If not running, you need to click Start buttons to run.

Step 3 - Open your web browser and type http://localhost or http://127.0.0.1




Click the enter. after you will see a page like this. 




Step 4 - Go to phpMyAdmin.




Step 5 - Click New.




Step 6 - Enter your database name and create it.

Give any name here and click create button.


After you will see like this.


Now your database created successfully. 

But still not created any database table. We need to create some tables for our database to store data.
I will tell you how to create database tables in another post.