Php MyAdmin Exercise 1

PhpMyAdmin-2.5.1 Installation

 

1.  phpMyAdmin is a collection of .php files that allow you to connect to your mySQL database and graphically make changes that you would normally have to do with text by logging on to the mySQL server and typing commands.

2.       To get started, download the phpMyAdmin compressed file from http://www.phpmyadmin.net/. Click on the file called phpMyAdmin-2.5.1-php.tar.gz

 

·        The filename on the website may change (i.e. a new version - download the latest version)

·        I suggest downloading phpMyAdmin-2.5.1 or greater because of updated support for mySQL 4.1. Although by default, Redhat Linux 9.0 installs mySQL 3.23, you can easily upgrade to mySQL 4.x and phpMyAdmin-2.5.1 will still work correctly

 

3.  Save this file to /var/www/html to make it easier to install.

4.  Go to a terminal prompt and type the following (assuming you saved the file in /var/www/html as directed):

 

·         shell > cd /var/www/html

·         shell > tar -zxvf phpMyAdmin-2.5.1-php.tar.gz

·        Figure 5.1 shows this in a terminal window

 


Figure 5.1

 

5.  Next you will need to edit the configuration file to make sure phpMyAdmin correctly connects to the mySQL server. The tar process creates a new folder called phpMyAdmin-2.5.1 in the /var/www/html folder.

 

shell > cd /var/www/html/phpMyAdmin-2.5.1

shell > vi config.inc.php

 

6.  After opening the configuration file, scroll to line 75 (could possibly be different in your case) and change the following lines by touching i (for insert) on the keyboard.

 

$cfg['Servers'][$i]['password'] = '';

to

$cfg['Servers'][$i]['password'] = 'your root password';

·        Note: Replace your root password with the root password you set for your mySQL database in the mySQL setup tutorial.

 

7.  Also change line 39 (line # could be different) from

 

$cfg['PmaAbsoluteUri'] = '';

to

$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin-2.5.1';

 

8.      Hit ESC and then type :wq (means write and quit) to save the file and return to a command prompt. Figure 5.2 shows the previous steps.

 


Figure 5.2

 

9.      This should be everything you need to get phpMyAdmin up and running. To test it out, open a web browser and go to http://localhost/phpMyAdmin-2.5.1

10.         Make sure you password protect the directory /var/www/html/phpMyAdmin-2.5.1/. For information on how to do that, please refer to the Apache Configuration Guide.

 

On Your Own Exercise 1

 

  1. Verify you have done everything mentioned above and print out the first screen you see when going to http://localhost/phpMyAdmin-2.5.1