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

Is 57C Idle Temperature Normal for My RX 9070 XT?

Hey folks! I'm currently using a Gigabyte RX 9070 XT OC version, and I've noticed that my idle temperature sits at 57C, with the...

How to Build a Simple Game Engine for Text-Based Games?

I'm looking for advice on how to create a straightforward game engine specifically for text-based games. While I've had some experience with Godot, it...

Should I remove the thermal paste stickers on my heatsink if I’m not using those SSD slots?

I have an Asus ROG Strix X870-A motherboard that features a large heatsink. My concern is whether the thermal paste stickers will melt due...

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

xAI Grok Token Calculator

This tool is a simple xAI Grok token calculator that helps you estimate the number of tokens your input text might consume when working...

DeepSeek Token Calculator

This tool is a straightforward DeepSeek token calculator, created to help you estimate how many tokens your text may use when working with DeepSeek...

Google Gemini Token Calculator

This tool is a simple Google Gemini token calculator, designed to help you estimate how many tokens your text might use with models in...

Meta LLaMA Token Calculator

This tool is a basic Meta LLaMA token calculator, designed to give you a fast estimate of how many tokens your input text might...

Anthropic Claude AI Token Calculator

This tool is a simple Claude token calculator, built to help you quickly estimate token usage when working with Anthropic’s Claude models. It’s an...

OpenAI Token Calculator

This tool is a simple OpenAI token calculator, web-based utility designed to help you quickly estimate the number of tokens in your text when...

Latest Posts

Latest Questions