Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»How to Install PhpMyAdmin on CentOS/RHEL 7/6

    How to Install PhpMyAdmin on CentOS/RHEL 7/6

    RahulBy RahulSeptember 23, 20152 Mins ReadUpdated:February 15, 2020

    phpMyAdmin is a well most popular web-based client for managing MySQL server. PHPMyAdmin is written in PHP programming language. 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. This article will help you to install phpMyAdmin on CentOS/RedHat System.

    Prerequsities

    In order to use PHPMyAdmin, you must have PHP, MySQL and Apache installed on your system. Also, you need PHP-MySQL or PHP-MySQLi module enabled in PHP configuration. For the current version of PHPMyAdmin 4.7.2, the requirements are as follows.

    • Apache >= 2.2
    • PHP >= 5.5
    • MySQL/MariaDB >= 5.5

    Use the tutorial: Installing Apache MySQL PHP on CentOS and RedHat

    Step 1 – Enable Remi Repository

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

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

    Step 2 – Install PhpMyAdmin on CentOS

    After enabling Remi repository on your system, let’s start the with the installation of phpMyAdmin using yum package manager. All the dependencies will automatically be installed.

    yum --enablerepo=remi,remi-test  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 Apache configuration file of phpMyAdmin.

    sudo vi /etc/httpd/conf.d/phpMyAdmin.conf
    

    Now check for below section. Change Require local to Require all granted, This will disable local restriction access and phpMyAdmin will be accessible from the network.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Alias /phpMyAdmin /usr/share/phpMyAdmin
    Alias /phpmyadmin /usr/share/phpMyAdmin
     
    <Directory /usr/share/phpMyAdmin/>
       AddDefaultCharset UTF-8
     
       <IfModule mod_authz_core.c>
         # Apache 2.4
         Require all granted
       </IfModule>
       <IfModule !mod_authz_core.c>
         # Apache 2.2
         Order Deny,Allow
         Deny from All
         Allow from 127.0.0.1
         Allow from ::1
       </IfModule>
    </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 a browser using the 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.

    mariadb MySQL phpmyadmin PMA
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Extract Filename & Extension in Shell Script
    Next Article Best way to Manage SSH Hosts and Private Keys

    Related Posts

    Backup MySQL Databases to Amazon S3 (Shell Script)

    Updated:May 28, 20222 Mins Read

    How to Install MariaDB on Ubuntu 22.04

    Updated:May 28, 20222 Mins Read

    How To Install Linux, Nginx, MySQL, & PHP (LEMP Stack) on Ubuntu 22.04

    Updated:April 7, 20227 Mins Read

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How to Install Apache, MySQL, PHP (LAMP Stack) on Ubuntu 22.04

    Updated:June 28, 20225 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    34 Comments

    1. Ganesh on May 5, 2019 12:33 am

      Cannot log in to the MySQL server

      I have used mysql user and password, getting above error

      please help me out rahul

      Reply
    2. Mahdy on February 6, 2019 1:26 pm

      How to install PHPmyadmin for PHP 7.3?

      Error: Package: php-tidy-5.4.16-7.el7.x86_64 (epel)
      Requires: php(zend-abi) = 20100525-64
      Installed: php-common-7.3.2-1.el7.remi.x86_64 (@remi-php73)
      php(zend-abi) = 20180731-64
      Available: php-common-5.4.16-46.el7.x86_64 (base)
      php(zend-abi) = 20100525-64
      Error: Package: php-tidy-5.4.16-7.el7.x86_64 (epel)
      Requires: php(api) = 20100412-64
      Installed: php-common-7.3.2-1.el7.remi.x86_64 (@remi-php73)
      php(api) = 20180731-64
      Available: php-common-5.4.16-46.el7.x86_64 (base)
      php(api) = 20100412-64
      Error: Package: php-mbstring-5.4.16-46.el7.x86_64 (base)
      Requires: php-common(x86-64) = 5.4.16-46.el7
      Installed: php-common-7.3.2-1.el7.remi.x86_64 (@remi-php73)
      php-common(x86-64) = 7.3.2-1.el7.remi
      Available: php-common-5.4.16-46.el7.x86_64 (base)
      php-common(x86-64) = 5.4.16-46.el7
      Error: Package: php-bcmath-5.4.16-46.el7.x86_64 (base)
      Requires: php-common(x86-64) = 5.4.16-46.el7
      Installed: php-common-7.3.2-1.el7.remi.x86_64 (@remi-php73)
      php-common(x86-64) = 7.3.2-1.el7.remi
      Available: php-common-5.4.16-46.el7.x86_64 (base)
      php-common(x86-64) = 5.4.16-46.el7
      You could try using –skip-broken to work around the problem
      You could try running: rpm -Va –nofiles –nodigest

      Reply
      • asvns on September 5, 2019 4:13 pm

        Hello, have you a solution? I have same issue

        Reply
      • ASVNS on September 5, 2019 4:24 pm

        Hi find solution
        yum install -y –enablerepo=remi-php73 phpmyadmin

        Reply
    3. nitin on December 21, 2014 5:15 pm

      Hi,
      Thanks its very useful for me ………

      Reply
    4. Kuldip on November 7, 2014 7:54 am

      @ 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

      Reply
    5. Hadi on October 21, 2014 9:53 pm

      Hello
      Useful article and I have translated to persian in following link
      http://www.irwebhost.com/blog/

      Thank you

      Reply
    6. david tobi on October 14, 2014 12:01 pm

      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

      Reply
    7. Phil on October 11, 2014 11:40 am

      Works perfect!

      Thanks a lot on this article.

      PS: how to setup to access from anywhere?

      Reply
    8. satya on September 30, 2014 1:14 pm

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

      I am using centOs.

      Reply
    9. Aleksey on September 25, 2014 11:40 am

      I have a 404 erorr on page /phpMyAdmin/

      Reply
    10. james on September 1, 2014 8:02 am

      Thank you.

      Reply
    11. Daniel on July 1, 2014 10:29 am

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

      Reply
    12. CentOS_Guru on July 1, 2014 4:50 am

      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.

      Reply
    13. mjdj1999 on June 28, 2014 5:50 pm

      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!

      Reply
      • Rahul on June 30, 2014 3:49 am

        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“

        Reply
    14. tom on June 25, 2014 5:23 am

      please how can I know mysql user and password?

      Reply
      • Rahul on June 26, 2014 3:01 am

        Hi Tom,

        Password will be same as you set during installation.

        Reply
    15. Fahad Tariq on June 2, 2014 7:00 am

      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?

      Reply
      • Rahul on June 2, 2014 1:21 pm

        Hi Fahad,

        Please install EPEL package firt – Instruction’s – http://tecadmin.net/add-epel-repository-in-centos-rhel/

        We will update article soon.

        Reply
    16. Crs on May 23, 2014 7:49 am

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

      Reply
    17. sj on April 9, 2014 7:37 am

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

      Reply
      • Rahul on April 9, 2014 9:52 am

        Use mysql user and password.

        Reply
    18. Smithd178 on March 31, 2014 6:27 am

      Very nice!

      Reply
    19. Namrata on March 18, 2014 7:35 am

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

      Reply
    20. dana on March 4, 2014 8:00 am

      thx, it works.

      Reply
    21. Kern on February 18, 2014 5:40 am

      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
      …

      Reply
      • Rahul Kumar on February 18, 2014 7:52 am

        Hi Kern,

        It looks phpMyAdmin is also updating MySQL server on your system. In this case we recommend to install it using source code, which is pretty simple :

        http://tecadmin.net/setup-phpmyadmin-on-linux-using-source/

        Reply
    22. Brad on November 18, 2013 11:39 am

      Thank you for sharing this article…..

      Reply
    23. Ahmed Shaaban Elgendy on October 29, 2013 8:48 am

      really, very good

      Reply
    24. Daniel on September 18, 2013 12:26 pm

      THANKS!

      Reply
    25. Sahil Singh on September 13, 2013 3:59 pm

      Hello admin

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

      Thanks in advance

      Reply
      • Khalifa on September 21, 2013 7:43 pm

        Note that you need to change the URL to 127.0.0.1 instead of 192.168.1.100 or what ever IP address you have.

        URL: http://127.0.0.1/phpMyAdmin/

        Reply
    26. Petrus on September 9, 2013 6:22 pm

      Dear Rahul:

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

      Best,

      P.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.