Allow phpMyAdmin remote access on xampp

xampp server only allow access to phpMyAdmin from localhost. This is because root password is set to blank by default. If you need to access phpMyAdmin over internet, it will be good to add a password protection for phpmyadmin.

Create a password file

/opt/lampp/bin/htpasswd -c /opt/lampp/htpasswd-phpmyadmin admin

Here “admin” is the user. You will be asked to enter a new password.

vi /opt/lampp/etc/extra/httpd-xampp.conf

Find

# since XAMPP 1.4.3

    AllowOverride AuthConfig Limit
    Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

Replace with


    AuthType Basic
    AuthName "Restricted Content"
    AuthUserFile /opt/lampp/htpasswd-phpmyadmin
    Require valid-user

Restart Apache

/opt/lampp/lampp reloadapache

Related Posts

Auto start XAMPP on Boot

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *