Вы находитесь на странице: 1из 8

PRACTICAL-3

Install and use of phpmyadmin.

phpMyAdmin is a free and open source tool written in PHP intended to


handle the administration of MySQL with the use of a web browser. It can
perform various tasks such as creating, modifying or
deleting databases, tables, fields or rows; executing SQL statements; or
managing users and permissions.

Features
1. Web interface
2. MySQL database management
3. Import data from CSV and SQL
4. Export data to various formats: CSV, SQL, XML, PDF (via
the TCPDF library), ISO/IEC 26300 - OpenDocument Text and
Spreadsheet, Word, Excel, LaTeX and others
5. Administering multiple servers
6. Creating PDF graphics of the database layout
7. Creating complex queries using Query-by-Example (QBE)
8. Searching globally in a database or a subset of it
9. Transforming stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link
10.
Live charts to monitor MySQL server activity like connections,
processes, CPU/Memory usage, etc.

http://your serverip/phpmyadmin/ now you should see the following


screen here you need to enter your mysql database details username as
root password as your mysql server root password by default mysql root
users doesn't have any password after entering these details press enter
now.

Once you enter in to the phpmyadmin you should see the following screen

Creating Database

Now you need to create a database for this you can see the create
database option in the above screen there you need to enter the database
name and click on create

Creating a table in your database


The left-hand frame in phpMyAdmin is used for navigation, when you log
in, you'll see the database you created displaying in this area. Tables will
also show up under each database once they are created.
Click on the database you created in the navigation frame and
a new window will appear on the right hand side.

We will now create the first table in the database, called "details". This is
done by using the Create new table feature. The name of the new table is
typed into the Name: field, and the number of columns in the table (4)
into Fields:. Please note that when you create your own databases and
tables, it's wise to plan them out carefully to allow for growth - this
exercise is only meant to help you to familiarize with basic
php/MySQL/phpMyAdmin functions.
After you click Go a screen similar to the following should appear. Notice
that the table title will now also appear under the database name in the

left hand navigation frame.

We now need to enter the names and attributes of our table fields. Enter
the following information:
Field
Type
id
int
name
char
telephone char
date
char

Length
6
100
50
50

The Length value indicates the maximum allowable length of characters


for input. There are many different values that can be set for Type; view
further documentation here. The Types specified in this example aren't
the most efficient, but just used for the purposes of this exercise. The "id"
field, which will be used as a Primary key for this table, has been set to
auto_increment, saving you from having to having to type in the next
number in sequence when you input records.
Once you've entered all the values, click Save. A screen similar to the
following will appear.

Now the table is now created. You'll notice that the corresponding SQL
command for creating these fields is also displayed. While you don't really
need to know this for the purposes of this exercise, it doesn't hurt to get
familiar with the lingo over time.
Also on this page, you'll see many other options - explore these later on
once you are familiar with the way everything is working.
Inserting data into the table
Inputting data into your new table is easy. On the current screen, there's
a tab labeled "Insert" - click this and another window should appear,
similar to the following.

Simply type in details for each of the fields for this record. As the "id"
column was specified to automatically increment, you will not need to
enter a number. This number will be unique, no other record will have it
and it will be added once the record is saved.
If you ever get lost while getting familiar with phpMyAdmin navigation,
simply click "Home" in the left hand nav bar and start again.
After you click Save, the record is saved to the details table, and the
previous window we saw reappears with the SQL command for the insert.
Additional records can be added by re-selecting Insert". If you are going
to be inserting multiple records, you can also select the "Insert another
new row" radio button on the input form.

Once you've entered a number of records into the table, you can review
the records by clicking on the Browse tab. You can also select individual
records for editing or deleting.

Once your database starts growing and you don't wish to flick through
pages and pages of records, you can utilize the Select tab to refine
displays.
Backing up your database
Click on your database name in the left hand navigation bar
- Click on EXPORT (top tab)
- Highlight the table/s you want to back up
You can select the whichever option is useful for your under export .If you
want save as file enter the file name and if you want use compression
select the available option for this.

you've created a database, a table and fields, entered in a few records,


viewed the records, edited and perhaps deleted some of them and
practiced backing up.I hope this will help some users how to use
phpmyadmin.

Вам также может понравиться