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.

phpmysqladmin-yum

Enter “y” to accept.

phpmysqladmin-gpg

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

phpmysqladmin-complete

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 http://www.yoursite.com/phpmyadmin 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 config.inc.php 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 http://www.yoursite.com/phpmyadmin/setup 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. You can sign up for my WEEKLY newsletter too. You'll get links to my new posts (like this one), industry happenings, project updates and much more! 📪

Sign Up for my WEEKLY email newsletter


I respect your privacy and I will NEVER sell, rent or share your email address.

2 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 mydomain.com/phpmyadmin

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

    Any guesses?

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

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.