2011-02-19 105 views
0

我正在使用rhel 5和php 5与MySQL 5.我的服务器已经配置并且顺利运行所有应用程序。我以root身份访问mysql,密码是'anitha123'。但是当我通过浏览器访问phpmyadmin时,它并不要求输入密码。有人请告诉我如何设置它像提示输入用户名和密码。由于我不熟悉php mysql,请告诉我如何以简单的方式来完成。为phpMyAdmin设置密码

+1

有关管理服务器的帮助,您应该考虑在http://serverfault.com上发布您的问题 - Stack Overflow用于编程问题。 – Sampson 2011-02-19 04:55:08

回答

6

发现phpmyadmin.conf 并设置身份验证键入到http

/* Authentication type */ 
$cfg['Servers'][$i]['auth_type'] = 'http'; 
1

或者干脆你可以添加密码进入phpmyadmin的的配置文件。此 找到config.inc.php文件是在phpMyAdmin目录,然后做出这些改变

找到行 $ CFG桩[ '服务器'] [$ i] [ '密码'] = '';

然后在布兰克字段中添加您的密码

$ CFG桩[ '服务器'] [$ i] [ '密码'] = 'anitha123';

,它总是使用相同的用户名和密码打开

0

进入phpMyAdmin的,并确保你有3根用户mysql的顺利使用。如果您在密码栏中看到“否”,请点击Edit Privileges---> Change Password选择Password选项并设置您的密码(三者必须设置为Password Yes)。虽然这样做不会刷新你的浏览器其他明智的你会得到一个错误

xampp mysql Access denied for user 'root'@'localhost' using password: YES 

你的用户屏幕必须是这样的。

User name Host  Password   Global privileges 
root  127.0.0.1   Yes  ALL PRIVILEGES  Yes  
root  ::1    Yes  ALL PRIVILEGES  Yes  
root  localhost   Yes  ALL PRIVILEGES  Yes 

当完成这个。只需使用此设置 - >在phpmyadmin目录中打开config.inc.php文件

/* Authentication type and info */ 
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = ''; 
$cfg['Servers'][$i]['extension'] = 'mysqli'; 
$cfg['Servers'][$i]['AllowNoPassword'] = true; 
$cfg['Lang'] = ''; 

现在打开phpmyadmin。 phpmyadmin会要求您输入密码。如果您提供了正确的密码,您将能够登录。