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.

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

To fix:

nano /etc/httpd/conf.d/phpmyadmin.conf

Remove or comment the first two lines in bold.

#Order Allow,Deny
#Deny from all

Allow from

Restart the apache server.

service httpd restart

Once this is done, you should be able to see phpmyadmin working by pointing your browser to http://ipaddress/phpmyadmin

This method worked for me and leave a comment here if there is an issue.

Similar Posts:


Balakrishnan Prabhu

Mr. Balakrishnan Prabhu is the founder of Corpocrat magazine. He is also the founder of Best Citizenships (BC), assisting wealthy individuals with with global citizenship and residency programs in Europe. His other interests are Linux, Machine learning, Wordpress, etc. You can contact him here

  • Someone

    not working for me 🙁


    Alias /phpmyadmin “c:/wamp/apps/phpmyadmin3.5.1/”

    # to give access to phpmyadmin from outside
    # replace the lines
    # Require local
    # by
    # Require all granted

    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Allow from all
    #Allow from

  • Veru

    This works for me (phpMyAdmin-3.5.1 + CentOS 5.9 x86_64 GNU/Linux):

    #vi /var/www/html/phpmyadmin/

    /* Authentication type */
    $cfg[‘Servers’][$i][‘auth_type’] = ‘http’;

    #vi /etc/httpd/conf/httpd.conf

    Order allow,deny
    Allow from all

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

    Alias /phpMyAdmin /usr/share/phpmyadmin
    Alias /phpmyadmin /usr/share/phpmyadmin

    # service httpd restart


  • Pedro Carlson

    Thanks for the help! worked great!

  • Nice, my problem got solved as your advise.

  • noodles

    The key to understanding this error is that by default the web server’s configuration allows access to the phpMyAdmin code tree from the localhost ONLY.

    The fix above may or may not apply, depending on the syntax in your phpMyAdmin.conf file. Essentially what you have to do is open the doors to the remote hosts. The .conf file will give you enough hints as to how to do this.

  • Hi there I’m still getting the error..what can i do???

  • Not quite. I receive connection refused even when connecting locally.

  • Or, you can leave the security intact and use the IP address of your workstation or ISP if you have a static IP.

    Just do a Google or Bing search for “What is my IP address” and it will tell you what it is. If you’re on a direct connection (for example you have your own pop and not using an ISP, run ipconfig command from the command prompt).

    Use that instead of If you’re on a dynamic IP (one that changes) you’ll have to repeat this step.

    It may seem annoying, until that one fateful day when some idiot with a bot and just enough knowledge to be dangerous tries to hack your phpmyadmin.