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

How Can I Get Claude to Access My Google Drive Files?

I've connected Claude to my Google Drive and I have several Word documents stored there. However, when I ask Claude how many files it...

Help! My New SSD Keeps Booting to BIOS

Hey everyone! I recently upgraded from a 240GB SSD to a 1TB SATA drive. I used DiskGenius to clone my SSD and run the...

How can I get a program launcher like the one in Arch on Linux Mint?

I've recently installed Linux Mint on my MacBook Pro and fell in love with the program launcher in Arch Linux. In Arch, I could...

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