ppd pract-3

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! e"ecuting SQL  statements! or managing users and permissions. #eatures $. %eb i nter face &. MySQL database management '. Impo rt da ta f rom (S) and SQL *. +"port data to various formats, (S) SQL -ML P# /via the 0(P# library1 IS23I+( &4'55 6 2penocument 0e"t and Spreadsheet %ord +"cel La0e- and others 7. 8dministerin g multiple servers 4. (reating P# graphic s of the database la yout 9. (reating comp le" :ueries u sing Query6 by6+"ample /Q;+1 <. Searching globally in a database or a subset of it =. 0r ansforming sto red data into any format usin g a set of predefined functions like displaying ;L2;6data as image or download6 link $5. Live charts to monitor MySQL server ac ti vi ty like connections processes (P>3Memory usage etc.

Upload: jay

Post on 04-Oct-2015

13 views

Category:

Documents


0 download

DESCRIPTION

How Install and use of php my admin.

TRANSCRIPT

PRACTICAL-3 Install and use of phpmyadmin.

phpMyAdminis afree and open sourcetool written inPHPintended to handle the administration ofMySQLwith the use of aweb browser. It can perform various tasks such as creating, modifying or deletingdatabases,tables,fieldsorrows; executingSQLstatements; or managing users and permissions.

Features1. Web interface2. MySQL database management3. Import data fromCSVandSQL4. Export data to various formats:CSV,SQL,XML,PDF(via theTCPDFlibrary), ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, Excel,LaTeXand others5. Administering multiple servers6. Creating PDF graphics of the database layout7. Creating complex queries using Query-by-Example (QBE)8. Searching globally in a database or a subset of it9. Transforming stored data into any format using a set of predefined functions, like displayingBLOB-data as image or download-link10. 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 mysqlserverrootpassword 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 anewwindowwill 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 Lengthid int 6name char 100telephone char 50date char 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"radiobuttonon 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 handnavigationbar

- 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.