How to create a Database in MYSQL - Using PhpMyAdmin SQL Command Shell Interface

This tutorial will teach you How to create a Database in MYSQL.After following these Precious steps on how to Create a database in Mysql,no database in the world will give you headache provided you continue learning on the new resources that are being introduced in this area of database management.

Start your local server, it can either be XAMPP, WAMP, LAMP ,WorkBench, Any thing that you are familiar with.For this tutorial we will be using XAMPP. I chose XAMPP because a big number of beginners getting started with database managment, SQL in general use this XAMPP software because it is a free and open-source cross-platform web server consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages.


Note: If you are using WAMP, don't wory they are the same methods or steps when creating a database like in XAMPP. The PhpMyAdmin interface is the same.

When you start your local server - XAMPP control panel (Apache HTTP Server) .Open your browser and navigate to http://localhost/phpmyadmin.You will land on the PhpMyAdmin dashboard displaying some extra information on the XAMPP services and the different databases that got installed with it by default.



Click the SQL tab in the menu section. The moment you click it, you will be provide with the white blank command shell where you will type these following simple,easy and Precious commands when creating your first database.

SQL Tab illustration


SQL command Shell illustration


Before creating a database, make sure that the name you are going to give it is very unique.As in there is no database with the same name in the system. The code/command below will enable you to see the different databases in the system.

//Type in the SQL shell      

Possible outcome - illustration


Now that you have seen the different databases in your system. Creating a database is going to be very easy.The code below we are creating a database called mybusiness. To make it easy for you to understand, consider the command CREATE DATABASE as the property and mybusiness as the value.

//command-database name


The command CREATE DATABASE tells the system what we want to do, as in what we want to create hence mybusiness becomes the name of the database for this case.You can name your database any thing you want but meaningful.

After writing that SQL query, click Go or Save depending on the software you will be using (XAMPP or WAMP).

Illustration(After writing that command) - possible message output.


Created Database(mybusiness)


Woow..for over decades u have been complaining on how creating databases was difficult and it turns out that only one line of command/statement is needed to over turn that fear of creating databases.

By default or common ways is selecting or clicking the created database to start using it or creating tables inside.But incase you are uisng a command prompt shell use the SQL command (USE DATABASE name_of_the_database).

Go back to the SQL tab in the menu section and type this command below in the command shell.After writing it, click Go or Save.

//command-database name
//use this in CMD shell
USE DATABASE mybusiness;

By doing that you will selecting or navigating to that specific database that you created previously.Alright guys that's how you can create a Mysql database using those simple Precious steps.

Now that you have created a database,learn how to create tables in Mysql databases.

Search it,Get it