How To: Install phpMyAdmin on Amazon Linux

I’ve been managing a few small MySQL databases lately that often need record updates but certainly don’t warrant building a separate management interface. The easiest way to accomplish this (assuming you don’t have complicated joins and relationships) is to install phpMyAdmin, a robust, web-based admin utility for MySQL that is built in php. In my case, I’m running these mostly on Amazon Linux instances, so after a little poking around, it turns out the installation is just 3 simple steps.

1. Install phpMyAdmin using yum with the epel repo.

This will ask to install some dependencies.


Enter “y” to accept.


It will then ask you to import the GPG key. Enter “y” to accept.


2. Map phpMyAdmin to a web accessible directory with a symbolic link.

The link is case sensitive, so be sure that phpMyAdmin has the correct capitalization.

3. Restart the httpd service.

And that’s it. Go to and you should see a login screen. Please note that this will connect to the MySQL server on localhost, but if you want to connect to additional servers (or make any other configuration changes), you’ll need to manipulate the file. For the Amazon Linux distribution, it is located in the /etc/phpMyAdmin directory.

There is also a setup tool that can be used to generate the configuration file. Go to and you’ll see all the options.

Tags: , , , , ,

Did you like this post? 👍  Do you want more? 🙌  Follow me on Twitter or check out some of the projects I’m working on.

4 thoughts on “How To: Install phpMyAdmin on Amazon Linux”

  1. Hi..

    I did the same as mentioned above.. but its showing me 403 Forbidden error when I try to visit

    You do not have permission to access /phpmyadmin on this server..

    Any guesses?

    1. Hi Vir,
      Try visiting to see if perhaps your default documents aren’t set up correctly. Also, be sure you have PHP installed.
      – Jeremy

  2. I am a newbie and unfortunately I can’t get this to work on a Amazon Linux 2 AMI (HVM), SSD Volume Type and get this error.

    [ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum –enablerepo=epel install phpmyadmin
    Loaded plugins: extras_suggestions, langpacks, priorities, update-motd

    Error getting repository data for epel, repository not found

Leave a 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.