我正在使用rhel 5和php 5与MySQL 5.我的服务器已经configuration,并顺利运行所有的应用程序。 我正在以root身份访问mysql并提供我的密码。 但是,当我通过浏览器访问phpmyadmin时,并没有要求input密码。 有人请告诉我如何设置它提示input用户名和密码。 由于我不熟悉PHP和MySQL,请告诉我如何以简单的方式做到这一点。
这很容易做到。
转到/my/path/to/phpmyadmin/config.inc.php。 用你最喜欢的编辑器打开它,并:
// 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';
现在一切都应该正常工作,并要求一个用户和密码。
此外,您可以添加一个HTTP Auth作为@Cocowalla说 – 为了更多的安全性。
希望这可以帮助 :)
您可以对phpMyAdmin使用Apache HTTP身份validation,也可以在phpMyAdmin安装目录的config.inc.php文件中指定用户名和密码。
更多信息在这里 。