How to Fix: PHPMyAdmin 403 Forbidden Error

If you have installed phpMyAdmin in your linux server (centos/RHEL/debian), and tried to access phpMyAdmin in most cases you will get this 403 forbidden error. I have seen this issue very often if you are installing phpmyadmin using yum or by apt-get. By default phpmyadmin installed path is /usr/share/phpmyadmin and the apache configuration file is located in /etc/httpd/conf.d/phpmyadmin.conf.

Forbidden
You don't have permission to access /phpmyadmin/ on this server.

To fix:

vi /etc/httpd/conf.d/phpmyadmin.conf

Remove or comment the first two lines in bold.

#Order Allow,Deny

#Deny from all
Allow from 127.0.0.1

Restart the apache server.

service httpd restart

phpMyAdmin installation and Configuring

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Visit the phpMyAdmin website for more information.

Version

  1. CentOS 5.x
  2. phpMyAdmin 3.1.x

Requirements:

Install phpMyAdmin 3.1.x

  1. Run the following yum install command
    yum install phpmyadmin
  2. Restart the Apache Server
    service httpd restart

Test

  1. Visit http://localhost/phpmyadmin in your local web browser. You should be prompted for authentication
  2. Enter the system root username and password and click OK
  3. You should now be presented with the phpMyAdmin home page