Install phpMyAdmin 4.3.10 on Fedora 21/20, CentOS/RHEL 6.6/5.11

phpMyAdmin-logoThis 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 following guide

LAMP (Linux/Apache/MySQL/PHP) on Fedora, CentOS/Red Hat (RHEL)

[Nginx]

1.1b Install the whole LEMP environment with following guide

LEMP (Linux/Nginx/MySQL/PHP) on Fedora, CentOS/Red Hat (RHEL)

OR

[Apache]

1.2a Install just MySQL and Apache with PHP using following guides

  1. Install MySQL 5.6 on Fedora, CentOS, Red Hat (RHEL) OR MariaDB 10/5.5 on Fedora, CentOS, Red Hat (RHEL)
  2. Install Apache (httpd) and PHP 5.6 on Fedora, CentOS, Red Hat (RHEL)

[Nginx]

1.2b Install just MySQL and Nginx with PHP (PHP-FPM) using following guides

  1. Install MySQL 5.6 on Fedora, CentOS, Red Hat (RHEL) OR MariaDB 10/5.5 on Fedora, CentOS, Red Hat (RHEL)
  2. Install Nginx and PHP 5.6 (PHP-FPM) on Fedora, CentOS, Red Hat (RHEL)

2. Install phpMyAdmin 4.2.1 on Fedora 21/20/19, CentOS/Red Hat (RHEL) 7/6.6/5.11

2.1 Change root user

2.2 Install Remi repository

Fedora

CentOS and Red Hat (RHEL)

Note: You can also use original Fedora phpMyAdmin builds or EPEL packages.

2.3 Install phpMyAdmin

2.3.1 Fedora 21

2.3.2 Fedora 20/19, CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11

3. Setup phpMyAdmin with Apache or Nginx

[Apache]

3.1a Check phpMyAdmin Apache Virtual Host

When you install phpMyAdmin you got working Apache Virtual Host automatically, but if you want change it, then check /etc/httpd/conf.d/phpMyAdmin.conf file and modify it.

[Nginx]

3.1b Check or Create phpMyAdmin Nginx Virtual Host

You can use default phpMyAdmin nginx virtual host conf on /etc/httpd/default.d/phpMyAdmin.conf or you can create your own virtual host config.

I use here custom custom version of phpMyAdmin conf. First create /etc/nginx/sites-available/phpMyAdmin file with following content:

This is Nginx phpMyAdmin virtual host configuration which works pretty much like original phpMyAdmin Apache configuration. I use here server_name pma you could freely change this real host name or some other.

Set pma pointing to localhost, add following to /etc/hosts file:

Create needed directory and enable Nginx virtual host:

[Apache]

3.2a Restart Apache Web Server

[Nginx]

3.2b Restart Nginx Web Server

4. Use phpMyAdmin

[Apache]

4.1a Open phpMyAdmin with Apache Setup

Open browser and Goto following address http://localhost/phpmyadmin.

[Nginx]

4.1b Open phpMyAdmin with Nginx Setup

Open browser and Goto following address http://pma/. Or if you use default phpMyAdmin config, then goto following address http://localhost/phpMyAdmin.

4.2 phpMyAdmin Login Screen

Login with your MySQL username and password.
phpMyAdmin Login

[Apache]

4.3a phpMyAdmin 4.3.10 Running on Fedora 21 with Apache

phpMyAdmin with Apache on Fedora 21

[Nginx]

4.3b phpMyAdmin 4.3.10 Running on Fedora 21 with Nginx

phpMyAdmin with nginx on Fedora 21

Share this post

118 Comments

  1. Hi JR,

    I tried to follow your steps. I install Remi repository.

    Reply
    • Reply
    • I install phpMyAdmin.

      Reply
      • Hi dhenyismail,

        Please run first following command:

        Then, could you post output of following commands:

        Reply
    • It Works perfectly on my Fedora 21, thanks

      Reply
  2. Hi!
    Great tutorial, but I have a minor problem.
    When I try to install phpmyadmin with:

    I get these errors:

    I’ve tried doing the yum clean all. So here’s the output of yum –enablerepo repolist and yum –enablerepo=remi info phpmyadmin:

    Oh, and other informations:

    OS: CentOS 6.5 (Final)
    Web service: nginx
    PHP version: 5.5.12

    I hope you can help me resolve these problems.

    Reply
    • Hi UltraG33k,

      I have to update this guide, when I have time to test this on every system.

      Try following install command instead:

      Reply
      • yes I was having the same problem but this seems to have solved it, just changed 55 to 56 for my system fedora 20 php5.6.

        Reply
  3. That worked perfectly! Thanks again for a great tutorial :)

    Reply
    • Excellent, you are welcome! I will update and check this guide soon with latest version.

      Reply
  4. Hello, I struggled for two days and fail to install phpmyadmin.
    My configuration is: vps, centos 6, nginx, mysql. I tried everything you wrote and every time I get “This page can’t be displayed”. I do not know what to do, perhaps I’ll send my account details that you look there?

    Thanks for everything you do for us.

    Reply
  5. Now I have this error:

    Reply
  6. Hi JR,

    I have RHEL server 6.5. I followed your instructions to installed Apache 2.2, PHP 5.5.13, MySQL 5.5.38. They work great!
    However when I install phpmyadmin with yum –enablerepo=remi,remi-php55 install phpmyadmin
    I got this error:
    Error: Package: php-recode-5.5.13-3.el6.remi.x86_64 (remi-php55)
    Requires: librecode.so.0()(64bit)
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    Would you please help me out? Thanks a lot!
    Isabella

    Reply
  7. Hi JR,

    I follow your instruction to install Apache Server, MySQL and phpadmin.
    However, after the installation, I got a 404 not found error when I try to test myphpmin on http://localhost/phpmyadmin.
    Is there anything I can check to find out the problem?
    Thanks a lot!!

    Reply
    • I found the solution!

      Just to soft link the folder from /usr/share/phpMyAdmin to /var/www/html:
      sudo ln -s /usr/share/phpMyAdmin /var/www/html/phpMyAdmin

      Thanks a lot!!

      Reply
  8. Pretty! This has been an extremely wonderful post. Thanks for supplying this information.

    Reply
  9. Hi again!

    I just installed Fedora 21 on my server. Is this tutorial still compatible?

    Reply
    • Hi UltraG33k,

      Yes, it should be. I haven’t tested this yet, but if you install following remi repo:

      Then it should work. phpMyAdmin version is of course newer.

      Please let me know how it goes and I update this guide. :)

      Reply

Submit a Comment

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