Password Protect PHPMyAdmin Without HTPASSWD
filed in Web Development on May.29, 2009
If you’re like me, and you like testing all of your web development stuffs on your own computer before pushing it onto your live environment you have something like XAMPP installed on your system. For me, I use Windows Vista, so I have the win32 version of XAMPP. For the past few days I’ve been trying to figure out how to make that neat password dialog come up, so that I could prevent unauthorized access to my PHPMyAdmin. For some reason the HTPASSWD dealy wasn’t working out for me, so I continued my research until I discovered how to activate PHPMyAdmin’s built-in password protection system.
How To Do It
1. Make sure you have your Username/Password already set up in PHPMyAdmin ( Under Privileges )
2. Make sure you have all proper Privileges setup for that Username
3. In your PHPMyAdmin Folder (located in your xampp directory) open up config.inc.php
4. Change the following line:
FROM:
$cfg['Servers'][$i]['auth_type'] = ‘config‘;
TO:
$cfg['Servers'][$i]['auth_type'] = ‘http‘;
5. Save and Refresh your PHPMyAdmin in your browser- You’re not ready to log in!










July 9th, 2009 on 4:32 am
This is….Elegant.
Using the htaccess seems a long process – I’m not an expert but this has worked beautifully for me.
What is the disadvantage of this though?