How to install and configure phpmyadmin in linux

 

Question: How to use mysql in graphical way rather than using command prompt ?

Answer: phpmyadmin tool is the way to access, add and edit your Mysql database graphically.

In this post i am going to explain you how to install and configure phpmyadmin in Linux operating system.

 

 

Step 1: First php and mysql package needs to installed in the linux machine.

#yum install php-* -y
#yum install mysql* -y

Step 2: Download the phpmyadmin tar package from the below link. The version of the phpmyadmin is 3.5

#wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.1/phpMyAdmin-3.5.1-english.tar.gz/download#

Step 3: Extract the phpmyadmin tar package using the below command.

#tar xvf phpMyAdmin-3.5.1-english.tar.gz

Step 4: Then rename the phpmyadmin package. Then move the renamed package to the location where http document root is pointed (for me http document root is pointed to /var/www/html )

#mv phpMyAdmin-3.5.1-english phpmyadmin

#mv phpmyadmin/ /var/www/html/

Step 5: Verify that http document root is pointed to /var/www/html by hitting the below command

#tail -4 /etc/httpd/conf/httpd.conf
<VirtualHost 10.60.1.202:80>
DocumentRoot /var/www/html/
ServerName 10.60.1.202
</VirtualHost>

Step 6: Phpmyadmin configuration file need few changes. For changes follow the steps below

cd /var/www/html/phpmyadmin
cp config.*.php config.inc.php
vi config.inc.php
$cfg[‘Servers’][$i][‘auth_type’] = ‘http';
$cfg[‘Servers’][$i][‘controluser’] = ‘root';
$cfg[‘Servers’][$i][‘controlpass’] = ‘mysql-root-pass';
Save the file.

Step 7: Restart the http service.

#/etc/init.d/httpd restart

Step 8: Open the browser and call the server followed by slash and phpmyadmin

http://<your-server-ip>/phpmyadmin

Note:
——-

Things to be taken care when doing  installation and configuration of phpmyadmin.

1.Make sure that http service is running and the port 80 is opened in iptables or in any Hardware firewall.

2.Make sure that mysql service is running and the port 3306 is opened in iptables or in any Hardware firewall.

3.Make sure that password for mysql is assigned for the user: root

4.Make sure that php package is installed in the server

5.phpmyadmin Latest version(3.5.1) does not support php 5.1
php 5.1 supports phpmyadmin-2.11.5.1, It can be download from below links

http://www.oldapps.com/phpmyadmin.php?old_phpmyadmin=1

http://www.oldapps.com/phpmyadmin.php?old_phpmyadmin=1?download