$cfgServers[1]['auth_type']     = 'http'; //即可

解决方案 »

  1.   

    顶阿!!我在我们的服务器上为了方便管理mysql安装了phpmyadmin,但是怎么设置它的安全性呢?要不然在任何地方的任何人都可以管理啦。
      

  2.   

    在config.inc.php里面找到下面三行
    $cfg['Servers'][$i]['auth_type']     = 'http';  // Authentication method (config, http or cookie based)?
    $cfg['Servers'][$i]['user']          = 'nobody'; // MySQL user
    $cfg['Servers'][$i]['password']      = 'nobody'; // MySQL password 
    改成你自己的设置就可以了,其中user只需要有mysql的select权限,这个user的作用是把你在页面上输入的用户名和密码拿到mysql表里面去验证。但是这个user因为存放在文件中,而且是明文的,所以只给mysql表的select权限,不要给其他权限。
      

  3.   

    也可以在APACHE中设置,比如你把phpMyAdmin放在如下位置:
    d:/newweb/phpMyAdmin
    那么在httpd.conf中加入如下内容:
    <Directory d:/newweb/phpMyAdmin> 
    AuthType Basic 
    AuthName phpMyAdmin
    AuthUserFile e:/apache.txt 
    Options Includes ExecCGI 
    <Limit GET POST> 
    require valid-user 
    </Limit> 
    </Directory>
      

  4.   

    哦,还有,e:/apache.txt文件是用来放置用户名和密码的格式为:
      user:password
      

  5.   

    我的设置为设置为http的时候,得到的却是500(服务器内部错误)
    很郁闷