How to Install PHPMyAdmin on CentOS 6?- CloudsDial

  • Introduction

    PHPMyAdmin is an open source tool used in place of MySQL command with graphical and more intuitive way of performing administration tasks like creating,editing, or deleting databases, and managing users with permissions. In the below article lets see how to install PHPMyAdmin on CentOS server.


    I will be working on a Fastwebhost managed CentOS 6.6 server.

    Initially for your CentOS 6.6 server to run PHPMyAdmin it needs LAMP (Linux, Apache, MySQL, PHP) stack installed.

    Now our server is ready for PHPMyAdmin installation. So, all you need to do is follow the below steps.

    Step 1 : Get EPEL Repository

    First, we'll install the EPEL repository. The EPEL repo (Extra Packages for Enterprise Linux) contains many additional packages, including the phpMyAdmin package we are looking for.


    rpm -iUvh


    Step 2 : Installing PHPMyAdmin on CentOS

    Before doing anything, the best practice is to ensure all the packages in the server are up to date.


    yum -y update


    Now our installation is one command away.


    yum -y install phpmyadmin


    Step 3 : Know your IP address

    To access your PHPMyAdmin we need to know the IP address of our Machine.

    Step 4 : Open PHP MyAdmin configuration file

    Check for PHPMyAdmin configuration file with any of the text editor. You can find that at


    nano /etc/httpd/conf.d/phpMyAdmin.conf


    This present setup is configured to deny access to any connection not being made from the server itself.

    Since we are working on our server remotely, we need to modify some lines to specify the IP address of your home connection.

    Change any lines that read Requireip or Allow from to refer to your home connection's IP address.

    Requireip Machine IP
    Allow from Machine IP
    Requireip Machine IP
    Allow from Machine IP

    Now restart Apache


    service httpd restart


    With this our PHPMyAdmin is in operational mode.

    We can access our interface with the domain name or public IP address followed by /phpMyAdmin, in your web browser and it should look like below image.




    You can login to it with your any MySQL user or MySQL root logins which you gave when installing LAMP.

    Step 5 : Securing PHPMyAdmin

    This step is optional unless you want to really secure it.

    Go to the PHPMyAdmin configuration file again.


    vim /etc/httpd/conf.d/phpMyAdmin.conf


    Toward the top of the file, you will see two lines that look like the below line, there will be a case sensitive. As both the lines looks similar, one with /PHPMyAdmin and other is /phpmyadmin.

    Alias /phpmyadmin /usr/share/phpMyAdmin

    These are alias, means we access our site's domain name or IP address, followed by either /phpMyAdmin or /phpmyadmin.

    We need to disable these specific aliases and put our custom examples -securelink in that place by removing or commenting out the existing lines.

    Alias /phpmyadmin /usr/share/phpMyAdmin

    Alias /securelink /usr/share/phpMyAdmin

    Now restart Apache.


    service httpd restart


    Thanks for reading our content. to know more about our services, kindly visit our website:

    CloudsDial Solutions Pvt Ltd

    Mail: [email protected]

    Skype ID: sivakumar.s07

    Youtube Link:


    NO:85 3rd FLOOR,



    PORUR, CHENNAI 600116.

    Contact-No: 8608522333