If you have already set up localhost | local server on your computer system than this article will help you to create MySQL Database using phpMyAdmin. And if not than please see our previous post from here.
In the previous post of “How to Set Up Local Server / Localhost Using XAMPP”, we explained you how you can configure and setup XAMPP on your computer system by providing you the step by step procedure.As you all know MySQL and phpMyAdmin come along with XAMPP, so you don’t need to download and install them from anywhere else. Well you can say that’s the main features of XAMPP.
Method to Create MySQL Database using phpMyAdmin
Step 1 – > Set Up Local Server / Localhost Using XAMPP by clicking here
Step 2-> Type http://localhost/phpmyadmin in the URL bar and press enter and you will see the screen like below :
Step 3-> Go to Databases and you will see the screen like below :
Step 4-> Here you will see a text box mentioning “create new databases”, provide the name to your new database and press Create, after that you will see the screen like below :
Here we are creating our own database so you are seeing “AfterLecture” inside the database name (you can give any name).
Step 5-> After you press create button , you will see the name of your newly created database in the left side as showing in the image below.
Step 6-> Now click on name of your newly created database name, (“afterlecture” in this case) and you will see the screen like below :
Step 7-> Here in this step you have to create the table in your database. For this you have to give some name and also specify the number of column it will contain. In this example we have given table as “Student” and number of columns as “3“, you can change it according to you.
Step 8-> After you hit Go button, you will see the screen like below : where you can give the titles and the datatype for columns which will act like your fields in the table.
Step 9-> We are making three fields in our database namely ID, Name and Email. You can make any number of fields. Here you can also set the type of value that the field can hold. There are several other constraints as well which you can learn when you practice them. But for simplicity we use only some of them.
Step 10-> After you set all the required fields than at the bottom you will see two options “Save” & “Go”. Press Save. Below the Save button you will some instructions which is helpful when setting up the fields.
Step 11-> When you are done with all the 10 steps, you will see the name of your table inside your database name, like below :
There you can also see the same options of creating tables & settings the number of column. As you know that database can also contain more than one table. But in this tutorial for simplicity, we have made only one table with the name “student“.
Step 12-> Now click on any highlighted option which you can see on the image showing above. Now you will see your table with the field names like below :
Step 13-> Now go to Insert option in the menu and start filling your table manually and click Go button.
Step 14-> After you pressed Go button you will the values into your table is filled by pressing Browse button
Step 15-> DONE!!!!! So this is the final output of all the above steps that we discussed. So here you can see that we have our database with the name “afterlecture” having one table name “student” with four records (by following the same procedure mention above ). You can insert the number of records of your choice.
Hope you like the article to “Create MySQL Database using phpMyAdmin”
Note 1: In the next post we are going to tell you how you can insert and retrieve the data to and from the database by using a very simple code.
* If you face any trouble in any step than please feel free to ask us.