7

I am using rhel 5 and php 5 with mysql 5. My server is already configured and running all applications smoothly. I am accessing mysql as root and supplying my password. However, when I access phpmyadmin through browser, it is not asking for my password. Somebody please tell me how can I set it to prompt for username and password. Since I am not familiar with php and mysql please tell me how to do it in simple way.

2 Answers 2

10

This is easy to be done.
Go to /my/path/to/phpmyadmin/config.inc.php. Open it up with your favorite editor and:

// Uncomment this line if it's commented. 
// Then insert a random string in the quotes ('').
// Have in mind not to enter symbols as " or ' in the quotes.
// You could use something like this - dsd87892@829109skmclwopa&
// It doesn't matter what exactly you type as long as it's not ' and " :)
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

// Then find this and set it to cookie. ( I don't know what's the default. )
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 

Everything now should be working fine and should ask for a user and password.
Additionally you could add an HTTP Auth as @Cocowalla said - for even more security.

Hope this helps :)

0
1

You can use Apache HTTP authentication for phpMyAdmin, or you can specify a username and password in the config.inc.php file in your phpMyAdmin installation directory.

More information available here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.