How to Install phpMyAdmin 4.3 on CentOS/RHEL 6/5 and Fedora 20/19

phpMyAdmin is web-based client written in php for managing MySQL and MariaDB databases. It provides a user friendly web interface to access and manage your databases. To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages.

phpmyadmin-banner

Features of phpMyAdmin:

    • Friendly web interface
    • Supported most of the MySQL features:
      • Browse and drop databases, tables, views, fields and indexes.
      • Create, copy, drop, rename and alter databases, tables, fields and indexes
      • Manage MySQL users and there privileges
    • Import data from CSV and SQL
    • Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 – OpenDocument Text and Spreadsheet, Word, LATEX and others
    • Administering multiple servers

This article will help you to install phpMyAdmin on CentOS/RedHat System. It required Apache, PHP and MySQL to be installed on server. If you do not have them read our turtorials to how to install them.

Installing Apache MySQL PHP on CentOS and RedHat

Step 1: Enable Remi Repository

phpMyAdmin most updated package is available under remi repository. Install it in your system using following commands.

CentOS/RHEL 6:
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

CentOS/RHEL 5:
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm 

Fedora 20:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-20.rpm
 
Fedora 19:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm
 
Fedora 18:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm

Step 2: Install phpMyAdmin

After adding remi repository, install phpMyAdmin using yum package manager. All the dependencies will automatically be installed.

# yum --enablerepo=remi install phpMyAdmin
Step 3: Configure phpMyAdmin

phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit /etc/httpd/conf.d/phpMyAdmin.conf and update all 127.0.0.1 with your network like below or enable phpMyAdmin access for everyone.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

## Comment below section to allow everyone 
<Directory /usr/share/phpMyAdmin/>
    <IfModule !mod_authz_core.c>
     Order Deny,Allow
     Deny from All
     Allow from 192.168.1.0/24
     Allow from ::1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

After updating phpMyAdmin Apache configuration file, restart Apache service to reload new settings.

# service httpd restart
Step 4: Access phpMyAdmin in Browser

Now you can access phpMyAdmin in browser using following url. Change svr1.tecadmin.net with your server IP/FQDN.


http://svr1.tecadmin.net/phpMyAdmin/

Login Details: Use MySQL username and password.

phpMyAdmin-Login-Screen

Congratulation’s You have successfully installed phpMyAdmin. Using single phpMyAdmin we can manage multiple MySQL servers by adding multiple remote MySQL server. Use this article to add multiple MySQL hosts in phpMyAdmin.

Rahul

Founder of TecAdmin.net. I love to work with Linux and other open source application. Also I like to share knowledge with my friends and other Linux users. Follow me on Twitter, Add me on Google+ or Like Facebook page.

30 Comments

  1. Dear Rahul:

    Thank you for getting this up I was in a big hurry and found it comprehensive and useful.

    Best,

    P.

  2. Sahil Singh Reply to Sahil

    Hello admin

    I have followed above steps, but I m getting 403 access denied error…… please help me

    Thanks in advance

  3. Thank you for sharing this article…..

  4. I’m running into a problem in step #2 : yum install phpMyAdmin
    Where “conflicts” are found!!!
    Please help.
    Thanks
    Kern —

    Transaction Check Error:
    file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.73-3.el6_5.i686 conflicts with file from package MySQL-server-5.5.35-1.linux2.6.i386
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.73-3.el6_5.i686 conflicts with file from package MySQL-server-5.5.35-1.linux2.6.i386
    file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.73-3.el6_5.i686 conflicts with file from package MySQL-server-5.5.35-1.linux2.6.i386
    file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.73-3.el6_5.i686 conflicts with file from package MySQL-server-5.5.35-1.linux2.6.i386

  5. Thanks for providing steps to configure PHPMyAdmin… its work for me without any hurdles.
    Cheers…

  6. nice to read your article it insatll sucessfully but what will be the user name & password to login it??? please reply

  7. Thanks for the tutorial, it was very simple and worked great for me.

  8. When I do the first step, I get this
    Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    warning: /var/tmp/rpm-tmp.9YYBPo: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
    error: Failed dependencies:
    epel-release >= 6 is needed by remi-release-6.5-1.el6.remi.noarch

    So I dont continue. Please tell me how to fix it?

  9. please how can I know mysql user and password?

  10. I just installed on Centos 6 on a dedicated server. The install following these instructions went flawlessly without errors. I also followed the directions for PHP and Apache. THANK YOU! However, I cannot view phpMyAdmin in my browser. I have tried going to it via “FQDN/phpMyAdmin/” and by “http://my.IP/phpMyAdmin/” and neither works. I know its probably something I did in Step. 3 but not sure how to configure this file for web access.

    Can anyone provide a phpMyAdmin.conf scenario that will allow me to access via web??

    Thank you in advance!

    This is a great article and is laid out for a very easy installation. Thank you!

    • HI mjdj1999,

      Please change “Allow from 192.168.1.0/24″ in phpMyAdmin.conf file with your LAN ip or system ip. If you have any confustion about which ip to use. You can open it publicly like “Allow from all

  11. Hi!
    I have successfully installed it and when I try to login. I enter my credentials. It loads and still stay at the login page.

    It never change the page.

  12. When I attemp to install Remi it says that it could not ressolve the host, HELP

  13. I have a 404 erorr on page /phpMyAdmin/

  14. I am getting this error
    phpMyAdmin – Error
    The json extension is missing. Please check your PHP configuration.

    I am using centOs.

  15. Works perfect!

    Thanks a lot on this article.

    PS: how to setup to access from anywhere?

  16. please some one should send me test on how and procedure on how i can install my phpmy on my computer have been finding it difficult please

  17. @ PHIL
    :: TO ALLOW FROM EVERY WHERE ::

    ## Comment below section to allow everyone

    Order Allow,Deny ( Change # 1)
    Allow from All (Change # 2)
    Allow from 192.168.1.0/24
    Allow from ::1

Leave a Reply