Dreevoo.com | Online Learning and Knowledge Sharing
 
Home | Programs | Programming languages | PHP & MySQL | Create MySql database with phpMyAdmin
Guest
Click to view your profile
Topics
Programs
Languages
Recipes
Home
Shortcuts
 
 

Create MySql database with phpMyAdmin

We will learn basic usage of phpMyAdmin, one of the most popular applications for editing MySql databases.

 
  Author: podtalje | Version: phpMyAdmin | 5th May 2013 |  
 
 
1.
 

The latest version of phpMyAdmin can be found on:
http://www.phpmyadmin.net/home_page/index.php

But if you are starting with PHP and MySql development, I would recommend that you install WAMP server which includes complete environment for developing PHP applications and also has phpMyAdmin and MySql database included.

Installation instructions for WAMP server can be found on:
http://www.dreevoo.com/content.php?id=1229

 
 
2.
 

First we will create new database.

Into the field under Create new database enter my_db, which will be the name of our database.

Click button Create.

 
 
3.
 

Now we will create a new table.

Enter my_table into the Create new table on database field.
For Number of fields enter number 4.

Click button Go to create a new table.

It is important to understand that databases usually have more than one table. If you like, you can later add additional tables.

 
 
4.
 

For names and types of fields we set the following values:
id  (INT)
number  (INT)  
text  (TEXT)
date  (DATE)


Name of field can be arbitrary.
Type for each filed defines what kind of content the field will contain.

Type INT represents whole numbers.
Type TEXT represents text.
Type DATE will accept date format.

 
 
5.
 

We named the first filed id and it will represent a number that is unique for every record.

This is usually need if we want to delete or edit specific record.

We click A_I (Auto_Increment) checkbox.

When we insert value 0 for this filed, MySql will automatically assign a value that is an increment of the current highest number in the table.

 
 
6.
 

Now we will insert some data into our table.

Click tab Insert.

 
 
7.
 

Enter the following values:

field id: 0
field number: 123
field text: sample text
field date: 2013-05-03

Date filed must be in format year-month-day.

Click button Go.

 
 
8.
 

By clicking the tab Browse, the content of our table will be shown.


 
 
9.
 

If everything was done correctly, you should be able to see the data that you entered.

By repeating the steps above you can now insert new data or you can try to create additional tables.

 
 
 
   
  Please login to post a comment
  Click to open user profile  
Sikandar Khan, 9th May 2013, 5:08 AM
its good
 
 
  Click to open user profile  
podtalje, 9th May 2013, 3:30 PM
I am glad you like it.
If you have any additional questions, please do not hesitate to ask.
 
 
  Click to open user profile  
gavinv3, 20th May 2013, 2:51 AM
Hello,
I was a bit lost on the first step. as I did not see any option to create a new database.
the PHPMyAdmin version I am using is Version information: 3.5.5,

I did somehow manage to create the database in Cpanel database wizard. and the followed all your steps.
I appreciate your help as you made it so simple to understand, which otherwise would be confusing.

I would now like to learn how to connect a php form with the db I created. can you help.
 
 
  Click to open user profile  
podtalje, 20th May 2013, 3:51 AM
Your service provider most probably does not allow to create database through phpMyAdmin and only allows databases to be created in cPanel. They do this to have more control.

Anyway I am glad that you managed to create the database.

About connecting a php form with connection to the database, I can prepare a lesson about this today and it will be published tomorrow. As you will see it is not that complicated.

And of course if you have any additional question about PHP, just ask here on forum and I will do my best to help you.

 
 
  Click to open user profile  
podtalje, 21st May 2013, 1:34 AM
The lesson is now published:
http://www.dreevoo.com/content.php?id=14....

I hope it will help.
 
 
  Click to open user profile  
gavinv3, 23rd May 2013, 5:56 AM
I'm so happy to know that there are generous people like you who go out of the way to help.
it may be a simple thing for you, but its a great help for people like us.
Appreciate everything you did for me so far.
I will post any question I have in the future in the forums.
thanks a lot.
 
 
  Click to open user profile  
mat, 24th May 2013, 1:56 AM
Thanks Gavin for the kind words. That's why is the idea of knowledge sharing so great, some people are great at php, some at Photoshop others know how to build a chair, etc. We can all learn and gain from eachother, that's the whole point. Enjoy your stay!
 
 
  Click to open user profile  
iveesscit, 13th Nov 2023, 4:24 AM
Hello,
When I first started out, I was confused. as I could not find a way to initiate a brand new database.
My current installation of PHPMyAdmin is 3.5.5 (see below for version details).

Cpanel's database wizard helped me set up the database. and they did exactly what you said to do.
Thank you for clarifying something that, without your assistance, I would have found difficult to grasp. https://phrazle.co
 
 
  Click to open user profile  
rosydam, 15th Nov 2023, 9:51 AM
With over 250 college teams to choose from, https://retrobowlcollege.org presents you with a vast array of options, each with its unique set of challenges and opportunities for success.
 
 
  Click to open user profile  
lilycollins, 16th Nov 2023, 10:39 AM
Sure! phpMyAdmin https://slopeonline.org is a free open-source web-based tool written in PHP that allows users to manage MySQL databases. It provides a graphical user interface (GUI) that makes it easy to perform common database tasks such as creating and editing databases, tables, and users; executing SQL queries; and importing and exporting data.

 
   
 
 
online learning made for people
Dreevoo.com | CONTRIBUTE | FORUM | INFO