phpmyadmin - Mysql Database Web Front Administration Configuration
What is phpmyadmin ?
A set of PHP-scripts to manage MySQL over the web. phpMyAdmin can manage a whole MySQL server (needs a super-user) as well as a single database. To accomplish the latter you'll need a properly set up MySQL user who can read/write only the desired database. It's up to you to look up the appropriate part in the MySQL manual.
php 4.1.0 or later
You need GD2 support in PHP to display inline thumbnails of JPEGs ("image/jpeg: inline") with their original aspect ratio
You need PHP 4.3.0 or newer to use the "text/plain: external" MIME-based transformation
Before installing phpmyadmin you make sure that you have mysql server and php with required modules are installed
#apt-get install phpmyadmin
apt-get install phpmyadmin
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0B/2768kB of archives.
After unpacking 10.7MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package phpmyadmin.
(Reading database ... 13623 files and directories currently installed.)
Unpacking phpmyadmin (from .../phpmyadmin_4%3a2.6.2-3sarge1_all.deb) ...
Setting up phpmyadmin (2.6.2-3sarge1) ...
this will install the phpmyadmin in your machine.Now if you want to access phpmyadmin you need to enter the following url in to your browser
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
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 Length
id int 6
name char 100
telephone char 50
date 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" 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 practised backing up.I hope this will help some users how to use phpmyadmin.