Create Database, Tables by using the phpMyAdmin



PHP WAMP is a compact pack of the Window,Apache,MySql and PHP, when you install the WAMP then by default it installs the phpMyAdmin tool as well. phpMyAdmin is a tool by which you can manage the MySQL databases,tabes and it provides the interface so that you can do the multiple operation in to the MySQL. Basically phpMyAdmin is a tool written in PHP and it is used to handle the administration of the MySQL over the web and it is provided free of cost by the PHP community. Here in this post I am trying to describe how we can create the databases and tables by using the phpMyAdmin tool.

See the Screenshot below for the phpMyAdmin User Interface



Create the database using phpMyAdmin

Databases

For Creating the new database use the above form, put the database name then click “Create” button. In this example I am going to create the database name “ewa_testing_environment”. Database can be created by the Mysql query as well, you can create the database with the query given below:

CREATE DATABASE dbname;
or
CREATE DATABASE ewa_testing_environment;

Create table

creatingTable

After the database creation I am going to create the database ewa_testing_environment database. Refer to the above Screenshot. Enter the name of table and number of field. Here in this example, I am going to create the table “user_data” with 4 Number of columns/fields (i.e id, userId, user_password and user_email) and I have made the id field as the auto incremented and primary key. Refer to the Screenshot below

otherOperationinTable3

You can also create the table by running the sql query as well. Refer to the Screenshot below:

CreateTableByRunningSqlquery

CREATE TABLE `user_data` (
`id` int(1) NOT NULL auto_increment,
`userId` varchar(200) NOT NULL default '',
`user_password` varchar(200) NOT NULL default '',
`user_email` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1; 

This all about how to create the databases and tables by using the phpMyAdmin. Hope this will be helpful, Thanks and enjoy the PHP coding.