How to install phpmyadmin on linux

How to install phpmyadmin on linux server ?
Ans :
phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.
You can easily installed it on a plain Linux VPS Hosting or Dedicated server :
1. Download the latest version of phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php
OR
http://sourceforge.net/projects/phpmyadmin/files/
2. Rename the TAR file for your convenience :
root@support [~]# mv phpMyAdmin* phpMyAdmin.tar.gz
3. Untar the package :
root@support [~]# tar xzf phpMyAdmin*
4. Move it to the appropriate place :
root@support [~]# mv phpMyAdmin /usr/share/
5. Configure phpMyAdmin :
root@support [~]# cd /usr/share/phpMyAdmin
root@support [/usr/share/phpmyadmin]# cp config.*.php config.inc.php
root@support [/usr/share/phpmyadmin]# vi config.inc.php

6. Locate the following lines within that file & make sure each they look like the below ones :
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'mysql-root-pass';

7. Save the file.
8. Create the apache configuration file for phpMyAdmin :
root@support [/usr/share/phpmyadmin]# echo "alias /phpmyadmin /usr/share/phpMyAdmin" > /etc/httpd/conf.d/httpd.conf
9. Restart the http service :
root@support [~]# service httpd restart
10. You’re done

4 Thoughts to “How to install phpmyadmin on linux”

  1. thil

    Hi,
    I have downloaded and installed phpMyAdmin as said above and when i try to execute http:///phpmyadmin/ in my browser am getting following error:
    Forbidden
    You don’t have permission to access /phpmyadmin/ on this server.
    httpd.conf file has :
    alias /phpmyadmin /usr/share/phpMyAdmin
    Allow from all
    servername
    Pls advise.

    1. Thanks for the comments. Please follow the steps
      vi /etc/httpd/conf.d/phpmyadmin.conf
      Remove or comment the first two lines in bold.
      #Order Allow,Deny
      #Deny from all

      Allow from 127.0.0.1
      Restart the apache server.
      service httpd restart

      1. Anoop

        I just tried the same, but still same error. Please help!
        Forbidden
        You don’t have permission to access /phpmyadmin on this server.
        Apache/2.2.22 (EL) Server at linuxhost Port 80

        1. Please check all the setting once again

Leave a Comment