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
1 |
/opt/lampp/bin/htpasswd -c /opt/lampp/htpasswd-phpmyadmin admin |
Here “admin” is the user. You will be asked to enter a new password.
1 |
vi /opt/lampp/etc/extra/httpd-xampp.conf |
Find
1 2 3 4 5 6 |
# since XAMPP 1.4.3 <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory> |
Replace with
1 2 3 4 5 6 |
<Directory "/opt/lampp/phpmyadmin"> AuthType Basic AuthName "Restricted Content" AuthUserFile /opt/lampp/htpasswd-phpmyadmin Require valid-user </Directory> |
Restart Apache
1 |
/opt/lampp/lampp reloadapache |
Related Posts