Install and Configure PhpMyAdmin on Centos 7

PhpMyadmin is a fantastic tool that gives you an easy to use web interface that lets you manage a MySQL database. You can install PhpMyAdmin by downloading the source files from the official website and placing them onto your web server following the config. Better news is that there is actually a package on Centos and Red Had operating systems that will let you install it through the command line.

In order to get access to phpmyadmin via yum you will need to enable the epel repository. Execute the following commands to install epel and phpmyadmin.

yum install epel-release
yum install phpmyadmin

Once this has completed you will now have phpmyadmin installed on your server. You will need to restart apache in order for it to pick up the new conf files that were created when apache was installed.

service httpd restart

If you now visit “/phpmyadmin” for your website e.g. http://website.com/phpmyadmin. You will be able to gain access to the UI. Chances are you will encounter permission issues trying to access this. I constantly get this error when i first install phpmyadmin. In order to be able to use PhpMyAdmin without getting permission errors go to /etc/httpd/conf.d/phpmyadmin.conf. Replace the contents of the file with the following and restart apache after.

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
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</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>

Save this file and restart apache

service httpd restart

Try visit the URL again and you should now have access to phpmyadmin.

 

Related Articles

Related Questions

Can I Run a Docker Container Without Importing It First?

I'm aware that the typical way to start a Docker container is by importing the image first. The issue I have is that this...

Looking for SSD Replacement Recommendations

Hey everyone, it's been a while since I built my PC and I'm not really up to date with hardware these days. My computer...

How do I print duplicate labels on a Zebra ZD421?

Hey everyone, I'm not an admin but I'm running into a bit of a snag at work. We're close to implementing a print-on-demand system,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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

Latest Tools

Online Hash Generator – String to Hash Converter

Need to quickly generate a hash from a string? Whether you're verifying file integrity, securing data, or just experimenting with cryptographic tools, this simple...

Convert CSV To HTML Table

Need to quickly turn CSV data into an HTML table? Whether you're copying data from Excel, Google Sheets, or another spreadsheet, this tool makes...

Student Group Randomizer

Creating fair and balanced groups in the classroom can be time-consuming — especially when you're trying to avoid repetition, manage different skill levels, or...

Random Group Generator

Need to split a list of people, items, or ideas into random groups? Our free Random Group Generator makes it quick and easy. Whether...

Flip Text Upside Down – Free Online Tool

Ever wanted to flip your text upside down just for fun or to grab someone’s attention in a creative way? This free online Upside...

Raffle Ticket Generator

If you're running a fundraiser, charity draw, or local event and need raffle tickets fast, this free online tool lets you generate and print...

Latest Posts

Latest Questions