How to Create a MySQL Database in phpMyAdmin

Creating databases is the most important step in web development. This tutorial will teach you how to create a MySQL database in phpMyAdmin.

MySQL is a relational database management system. While phpMyAdmin is a free tool for MySQL database administration. It allows us to easily create, manage, and manipulate MySQL databases.

In this tutorial, we’re going to use phpMyAdmin to create a MySQL database. You’ll see step by step process to create a database. It is easier than you think.

So, let’s begin

How to Create a MySQL Database in phpMyAdmin

I’m going to walk you through the following steps to create a database using PHPMyAdmin on windows. You can jump on any of these four steps given below.

  1. Download and Install XAMPP on Your PC.
  2. Run Apache and MySQL servers in XAMPP.
  3. Access phpMyAdmin in your Browser.
  4. Create a MySQL Database.

Note: If you have a web hosting server and phpMyAdmin is available there. Then, you can start from step #4 directly to create a database. But for beginners, it is recommended to do this on localhost for practice.

Let’s create a database.

Step #1: Download and Install XAMPP on Your PC

XAMPP is an open-source web server software. It allows us to set a local web server environment on our local computer. In simple words, you can create a local web server on your PC using XAMPP.

With the help of XAMPP, you can do any backend web development work on your PC without buying a live server. Also, you can install WordPress on localhost using XAMPP and make projects.

XAMPP is very helpful for web developers.

It is available in different opertating systems for free. You can download it from their official website Apachefriends.org.

install XAMPP for MySQL database

After downloading XAMPP on your pc, install XAMPP, open it and then see the next step.

Step #2: Run Apache and MySQL servers in XAMPP

After installation of XAMPP, run it on your computer. Then, run Apache and MySQL servers in XAMPP as shown in the image below.

Run Apache and MySQL on XAMPP

Now, Apache and MySQL servers are running. Don’t close XAMPP, just minimize it and see the third step.

Step #3: Access phpMyAdmin in Your Browser

To do this, just open your browser and type localhost/phpmyadmin in your browser as shown in the image below.

open phpmyadmin page

It will take you to the place where you’ll create a MySQL database.

It’s time to see the main step.

Step #4: Create a MySQL Database

To create a MySQL database in phpMyAdmin, click on the New button as shown in the image below. This will take you to the page where you’ll give name to your MySQL database.

Create Database

Now, give your database a name. I gave it form_entriesdb name that is pretty informative. You can use underscores ‘_’ in name. And then, click on create button to create a new MySQL database as shown in the image below.

Create a New MySQL Database

Note: Give your database a unique name, do not copy.

Now, the database has been created as you can see in the following image. On the left side, my all the databases are listed.

MySQL Database

You can also create a database using SQL create database query with database name. To do this, just click on SQL as shown in the image below. Then, type create database form_entriesdb; and click Go button.

Create MySQL Database through SQL command

This is also an easy way to create a database in phpMyAdmin. But it requires some knowledge of SQL (Structured Query Language).

That’s it. Hope this tutorial will be helpful and easy.

Also read: How to Connect HTML form to MySQL Database using PHP.

Finally, if you’ve any questions then feel free to ask in the comments section below.

Share and Subscribe!

Leave a Comment