I have a phpMyAdmin folder. So first I set .htaccess folder and type this in it.
AuthUserFile /var/www/html/phpMyAdmin-3.4/.htpasswd AuthName "phpMyAdmin Login Page" AuthType Basic Require valid-user
The I created the username and password using this command
sudo htpasswd -c .htpasswd iamadmin
...and I could see both the .htaccess and .htpasswd files are in the folder. But when I go my link it never prompt for the additional username and password. My OS is centos 6.2