0% found this document useful (0 votes)
7 views

Lab12 - Create Database using phpMyAdmin

Uploaded by

Legesse Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lab12 - Create Database using phpMyAdmin

Uploaded by

Legesse Samuel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LAB 12: CREATE DATABASE USING phpMyAdmin

We will try to create a database, a table with 2 fields in MySQL database. In order to
do it, we have to use phpMyAdmin. phpMyAdmin is an interface for us to create
database.

1. To start phpMyAdmin, first we need to run wampserver.

2. Left click the speedometer, and select phpMyAdmin.


3. phpMyAdmin appears.
4. Create a database. You can put any name, but you have to remember it, because
we will use it later. I will name my database as azlanydb. Enter azlanydb,
and press Create button. [Note: If the database is already exists, try to name
your database using your name] Do not use space.
5. Notice that we are already in database azlanydb(0). 0 means there is no
table yet in the database. Next step is to create table login. Try to use the same
table name. We will named it login. (Do not use space). We will also try to
create 2 fields, so Number of fields is 2. Press Go button.

(NOTE: If you’ve another version of phpMyAdmin in your PC, it will appear


as azlanydb(-). It also means no table in azlanydb database)

How to look at
the version of
phpMyAdmin

No table
exists

6. Create two fields, username and password, type varchar means user can
put alphanumeric character. 10 means 10 characters only. Press Save button.
7. Notice that azlanydb(0) has change to azlanydb(1), means it has 1 table.
The table login is listed below it. Click Insert tab to insert some data.

8. Enter one row of data, enter azlany in the username value, and azlany in
the password value. Press Go button. [Note: If you want to enter two rows of
data, deselect ignore checkbox and enter another data.]
9. The display the data in the table, click Browse tab.

10. 1 row of data is in login table.

--Finish--

Exercise:
1. Try to edit data in login table. Click the icon to edit data.
2. Try to delete existing data in login table. Click the icon to delete data.
3. Try to add more data in login table.
4. Create other new table in azlanydb database.
5. Try to copy your database to your thumbdrive. Go to c:\wamp\mysql\data. Find
the folder which has the same name with your database. Copy the folder to your
thumbdrive. [Note: The folder is your database and all tables will be in that
folder].

So whenever you want to change pc, copy the folder first, and paste it on the other
pc (same location), provided that wamp has been installed in that pc.

You might also like