Install phpMyAdmin 4.3.10 on Fedora 21/20, CentOS/RHEL 6.6/5.11 - Comment Page: 2

This is guide, howto install phpMyAdmin 4.3.10 with Nginx or Apache on Fedora 21/20/19, CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 servers. phpMyAdmin needs web server with PHP and MySQL database. This guide uses Apache web server with PHP 5.6 or Nginx web server with PHP 5.6 (PHP-FPM) and MySQL 5.6 database server or MariaDB 10/5.5 database server. You can also use your already installed versions of web server, PHP and MySQL. If you want to install phpMyAdmin with Apache then use a - [Apache] sections and if you want install phpMyAdmin with Nginx then use b - [Nginx] sections. 1. Install Needed Web and Database Servers [Apache] 1.1a Install the whole LAMP environment with...

120 comments on “Install phpMyAdmin 4.3.10 on Fedora 21/20, CentOS/RHEL 6.6/5.11 - Comment Page: 2

1 2 3
    1. It’s working now. The only problem I have to work out is that I forgot the user/pass combination I had set up and Google-Fu isn’t helping. Lots of solutions, but nothing works yet.

      But thank you again for the help on this. It was a bit of a pain, and I’ll be upping the memory ASAP on the server so it’ll work a bit better.

      Reply
    2. yum –enablerepo=remi install phpmyadmin will fetch v 2.11 from rpmforg which is realy old insted type:

      yum –enablerepo=remi install phpMyAdmin

      which install 3.5.2.2 from epel

      Reply
      • Hi pouya,

        Yes, this depends what repositories you have installed, but if you want install it from remi repository, then you need to disable other not needed repos and install it from remi repo.

        Reply
        • hi JR

          In both statements we declare remi as our repo. i’m confused why we shouldn’t type

          yum –enablerepo=epel install phpMyAdmin

          if it’s possible please elaborate more

          thanks i bookmarked your site and always check it for useful and uptodate tutorials

          Reply
          • remi repo only contains 2.11 not 3.5.2

            Reply
            • Hi pouya,

              I said that you have to disable epel & rpmforge and enable remi:

              
              yum --disablerepo=epel,rpmforge --enablerepo=remi install phpMyAdmin
              

              Could you also post output of following commands:

              
              uname -a
              
              lsb_release -a
              
              yum repolist
              
              yum --disablerepo=* --enablerepo=remi list phpMyAdmin
              

              My output from remi repo is following:

              
              yum --disablerepo=* --enablerepo=remi list phpMyAdmin
              Loaded plugins: fastestmirror
              Loading mirror speeds from cached hostfile
               * remi: fr2.rpmfind.net
              Installed Packages
              phpMyAdmin.noarch                    3.5.2.2-1.el6.remi                    @remi
              

              So I see currently only phpMyAdmin 3.5.2.2 on remi repository.

              Reply
    3. JR As I was saying I’ back :). Sorry to bother you but I’m a linux noob.

      Followed your instructions wit success.
      My issue is that since this is a VPS I don’t have aces to localhost. therefore I must access phpmyadmin from web.

      How Do I do that. I’ve tried putting local host /phpmyadmin in the virtual host config with no success.
      Also tried putting it in default config without results.

      Thanks !

      Reply
      • Hi again Mosfet :)

        This is exactly reason why I run this site, try to help other users, so feel free to ask. :D

        First a couple of questions…so you are using nginx setup, right? Do you have some domain pointing to this server and you have control to subdomains?

        Reply
        • At this moment I have 2 domains pointing to the server. In test both work fine.
          But when I’m trying to access phpmyadmin all I get is an empty page.

          Tried the /phpmyadmin method posted in the comments and changing the “pma” in examples with my actual domain expecting to load phpmysql when accessing domain.tld to get phpmyadmin.

          Reply
          • Ok, then if possible create subdomain which point to your server too:
            pma.domain.tld

            Then create virtual host file, like:

            
            server {
                   listen   80;
                   server_name pma.domain.tld;
                   access_log /var/log/nginx/phpmyadmin/access.log;
                   error_log /var/log/nginx/phpmyadmin/error.log;
                   root /usr/share/phpMyAdmin;
             
                   location / {
                       index  index.php;
                   }
             
                   ## Images and static content is treated different
                   location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
                       access_log        off;
                       expires           360d;
                   }
             
                   location ~ /\.ht {
                       deny  all;
                   }
             
                   location ~ /(libraries|setup/frames|setup/libs) {
                       deny all;
                       return 404;
                   }
             
                   location ~ \.php$ {
                       include /etc/nginx/fastcgi_params;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$fastcgi_script_name;
                   }
            }
            

            Restart Nginx and try to access http://pma.domain.tld

            Reply
            • Hi, in order to make this more easy I’ve registered a .tk tld.

              I’ve created virtual host file for that domain and tested with a hello world php example. The test and domain is http://www.phpmyadmintestdomain.tk and as you can see the “hello world ” is working just fine.

              After this :
              – I’ve created and pointed the subdomain myadmin.phpmyadmintestdomain.tk to the VPS server.
              – Made a virtual-host file ( /etc/nginx/sites-available/myadmin.phpmyadmintestdomain.tk ) and a link to thesame file in /etc/nginx/sites-enabled.
              – restart nginx ( service nginx restart )

              Without any results. Also you can access the domain and subdomain.

              THANKS !

              Reply
              • This is the content of /var/log/nginx/phpmyadmin/error.log


                2012/10/27 02:15:50 [error] 22242#0: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"
                2012/10/27 02:15:53 [error] 22242#0: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"
                2012/10/27 02:15:57 [error] 22242#0: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"
                2012/10/27 02:17:56 [error] 22242#0: *8 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"
                2012/10/27 02:18:09 [error] 22242#0: *8 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"
                2012/10/27 02:18:20 [error] 22269#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx (MY IP), server : myadmin.phpmyadmintestdomain.tk, request: "GET / HTTP/1.1", upstream: "fastcgi ://127.0.0.1:9000", host: "myadmin.phpmyadmintestdomain.tk"

                Reply
            • Right after submitting this message I’ve reloaded the subdomain and got this message

              phpMyAdmin – Error

              Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

              Reply
            • On further investigation I found that PHP-FPM crashes.

              PHP-FPM error.log :
              WARNING: [pool www] child 910 exited on signal 11 (SIGSEGV) after 1027.210867 seconds from start

              Reply
      • Thanks, looks right files…could you post output of following command here:

        
        ls -la /var/lib/php
        
        Reply
    4. ls -la /var/lib/php
      total 12
      drwxr-xr-x 3 root root 4096 Oct 26 05:22 .
      drwxr-xr-x 20 root root 4096 Oct 26 05:34 ..
      drwxrwx— 2 root apache 4096 Oct 18 13:08 session

      Reply
      • Okay, problem is your php session path permissions you run php-fpm as nginx:nginx (user:group) and it can’t access session storage, because it have root:apache permissions. You have two option to fix this.

        1. Change following lines on php-fpm pool conf:
        From

        
        ; RPM: apache Choosed to be able to access some dir as httpd
        user = nginx
        ; RPM: Keep a group allowed to write in log dir.
        group = nginx
        

        To:

        
        ; RPM: apache Choosed to be able to access some dir as httpd
        user = apache
        ; RPM: Keep a group allowed to write in log dir.
        group = apache
        

        Restart PHP-FPM.

        2. Change /var/lib/php/session user and group to nginx

        
        chown -R root:nginx /var/lib/php/session
        

        Or

        
        chown -R nginx:nginx /var/lib/php/session
        

        Then try again access phpMyAdmin.

        Reply
    5. It works !

      Thanks for all your help and time !

      Reply
      • Excellent! :) You are welcome!

        Reply
    6. It finally works ! and by that I mean submitting messages to your blog (I’ve been trying for 3 days)

      Reply
      • Really, did you got any error messages?

        Reply
    7. Works 4 me. CENTOS 6.3

      Thank you !!!

      Reply
    8. Hi,
      Great tutorial, but I am having a strange issue I can not find anywhere.
      running CentOS 6.3
      Apache 2.2.15
      php 5.4.8
      MySQL 5.5.28

      when I go to http://mysite.com/phpmyadmin I get this on the screen.
      phpMyAdmin –

      I installed phpMyAdmin with Yum, following your tutorial.

      When I put phpMyAdmin in one of my websites public_html directories it works fine. I would rather have it in the /usr/shared/phpMyAdmin directory though.
      I installed SquirrelMail in the /usr/shared/squirrelmail directory, and it works as it is suppose to. I have tried a few different versions of phpMyAdmin and get the same thing.

      Doing the command curl -I http://localhost/phpmyadmin from the ssh I get this.
      [[email protected] ~]# curl -I http://localhost/phpmyadmin
      HTTP/1.1 301 Moved Permanently
      Date: Tue, 06 Nov 2012 14:18:31 GMT
      Server: Apache/2.2.15
      Location: http://localhost/phpmyadmin/
      Connection: close
      Content-Type: text/html; charset=iso-8859-1
      [[email protected] ~]#

      Any suggestions?

      Thanks,

      Reply
      • Hi Micahel,

        What you get when you try:

        
        curl -I http://localhost/phpmyadmin/
        

        Note trailing slash.

        Reply
        • Hi,
          Okay, this is what I get.

          [[email protected] ~]# curl -I http://localhost/phpmyadmin/
          HTTP/1.1 200 OK
          Date: Wed, 07 Nov 2012 07:08:04 GMT
          Server: Apache/2.2.15
          X-Powered-By: PHP/5.4.8
          Set-Cookie: phpMyAdmin=r4e2ha0okkfj38m3hrv0aruaiqhmq64s; path=/phpmyadmin/; HttpOnly
          Expires: Thu, 19 Nov 1981 08:52:00 GMT
          Cache-Control: private, max-age=10800, pre-check=10800
          Last-Modified: Mon, 08 Oct 2012 15:21:21 GMT
          Set-Cookie: pma_lang=en; expires=Fri, 07-Dec-2012 07:08:04 GMT; path=/phpmyadmin/; httponly
          Set-Cookie: pma_collation_connection=utf8_general_ci; expires=Fri, 07-Dec-2012 07:08:04 GMT; path=/phpmyadmin/; httponly
          Set-Cookie: pma_mcrypt_iv=VFpjxiI5%2FHM%3D; expires=Fri, 07-Dec-2012 07:08:04 GMT; path=/phpmyadmin/; httponly
          Set-Cookie: phpMyAdmin=4rt305508u7kfvkrusubabpk0oar0k00; path=/phpmyadmin/; HttpOnly
          Connection: close
          Content-Type: text/html; charset=utf-8

          Reply
          • Okay, looks like it’s working normally from localhost, so could you post output of following command:

            
            cat /etc/httpd/conf.d/phpMyAdmin.conf
            
            Reply
            • Hi, thanks, here is my phpMyAdmin.conf file.
              I can change it to allow all so you can see exactly what it is, or is not doing.

              # phpMyAdmin – Web based MySQL browser written in php
              #
              # Allows only localhost by default
              #
              # But allowing phpMyAdmin to anyone other than localhost should be considered
              # dangerous unless properly secured by SSL

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

              # Apache 2.4
              Require local

              # Apache 2.2
              Order Deny,Allow
              Deny from All
              Allow from 127.0.0.1
              Allow from 72.8.251.26
              Allow from ::1

              # Apache 2.4
              Require local

              # Apache 2.2
              Order Deny,Allow
              Deny from All
              Allow from 127.0.0.1
              Allow from ::1

              # These directories do not require access over HTTP – taken from the original
              # phpMyAdmin upstream tarball
              #

              Order Deny,Allow
              Deny from All
              Allow from None

              Order Deny,Allow
              Deny from All
              Allow from None

              Order Deny,Allow
              Deny from All
              Allow from None

              # This configuration prevents mod_security at phpMyAdmin directories from
              # filtering SQL etc. This may break your mod_security implementation.
              #
              #
              #
              # SecRuleInheritance Off
              #
              #

              Reply
              • Hi Michael,

                Thanks! It should work if your external ip is that 72.8…and you have reloaded/restarted httpd after this change. Could you also check your httpd access and error logs, and check if you have something suspicious there?

                Reply
                • Thanks for the help. I went to access it so it could be the most recent in the logs and it worked. No clue why it started working all of a sudden. I have not done anything to the server sense the last time I tried it and it did not work.

                  Thanks again.

                  Reply
                  • You are very welcome!

                    Nice to hear that you got it working. Hard to say what the problem was, because your configuration is right, maybe it was due the browser cache…

                    Reply
    9. This worked seamlessly. Had one issue with allowing external IP’s and it was answered in the comments. Much appreciated.

      Reply
    10. hi JR, questions like antiwesley, and I’ve tried to follow the steps in order to solve my problem. but my problem is not likely to INNO-db. is because when I look at the log (var / log / mysqld.log) there is no indication of a problem in the INNO-db.
      and still not be able to access my phpmyadmin (Forbidden

      You do not have permission to access / phpmyadmin / on this server.
      Apache/2.2.3 (CentOS) Server at 192.xxx.xxx.xxx port 80)

      you help me get this problem.

      Reply
      • Hi Adji,

        Could you try same on localhost, example using curl, and post output:

        
        curl -I http://localhost/phpmyadmin
        
        Reply
      • Oh my mistake, actually right command is same with slash:

        
        curl -I http://localhost/phpmyadmin/
        

        But actually looks like, it’s running.

        So then check /etc/httpd/conf.d/phpMyAdmin.conf and add following:

        
        
           
             # Apache 2.4
             Require local
           
           
             # Apache 2.2
             Order Deny,Allow
             Deny from All
             Allow from 127.0.0.1
             Allow from ::1
             Allow from [your external ip address here]
           
        
        

        And then restart apache:

        
        /etc/init.d/httpd restart
        
        ## OR ##
        
        service httpd restart
        
        Reply
    11. This using curl and post output :

      [[email protected] ~]# curl -I http://localhost/phpmyadmin/
      HTTP/1.1 403 Forbidden
      Date: Fri, 14 Jun 2013 13:43:34 GMT
      Server: Apache/2.2.3 (CentOS)
      Connection: close
      Content-Type: text/html; charset=iso-8859-1

      And This is my /etc/httpd/conf.d/phpMyAdmin.conf :

      # Apache 2.4
      Require local

      # Apache 2.2
      Order Deny,Allow
      Deny from All
      Allow from 127.0.0.1
      Allow from ::1
      Allow from 192.168.1.67

      I’ve followed the steps you give, but the problem still remains the same. “Forbidden

      You do not have permission to access / phpmyadmin / on this server.
      Apache/2.2.3 (CentOS) Server at 192.xxx.xxx.xxx Port 80 “

      Reply
      • Could you also post output of following command:

        
        curl -I http://127.0.0.1/phpmyadmin/
        
        Reply
    12. I followed below mentioned steps but it failed due to dependencies. Please help.

      Step 1: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
      Step 2: rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
      Step 3: yum –enablerepo=remi,remi-test install phpmyadmin

      Output of above is:
      Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
      Loading support for Red Hat kernel ABI
      Setting up Install Process
      Resolving Dependencies
      –> Running transaction check
      —> Package phpMyAdmin.noarch 0:3.5.8.1-1.el6 will be installed
      –> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Running transaction check
      —> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
      –> Processing Dependency: php-mbstring for package: php-php-gettext-1.0.11-3.el6.noarch
      —> Package phpMyAdmin.noarch 0:3.5.8.1-1.el6 will be installed
      –> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
      –> Finished Dependency Resolution
      Error: Package: php-php-gettext-1.0.11-3.el6.noarch (epel)
      Requires: php-mbstring
      Error: Package: phpMyAdmin-3.5.8.1-1.el6.noarch (epel)
      Requires: php-gd >= 5.2.0
      Error: Package: phpMyAdmin-3.5.8.1-1.el6.noarch (epel)
      Requires: php-mbstring >= 5.2.0
      Error: Package: phpMyAdmin-3.5.8.1-1.el6.noarch (epel)
      Requires: php-mysql >= 5.2.0
      You could try using –skip-broken to work around the problem
      You could try running: rpm -Va –nofiles –nodigest

      Reply
1 2 3

Leave a Reply to ashokP Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close