Home  >  Article  >  php教程  >  PHP设置phpMyAdmin设置登录密码

PHP设置phpMyAdmin设置登录密码

WBOY
WBOYOriginal
2016-06-13 09:37:211215browse

   phpMyAdmin直接与MYSQL相连,因此安全性来说非常关键,有的朋友为了图方便,根本没有为phpMyAdmin设置一个登录密码,这样很危险,若这个地址被别人知道,那你的MYSQL就完了。所以为了安全起见,我们还是要为phpMyAdmin设置一个密码,一般情况下,这个密码是和MYSQL密码是一致的,默认状态下,phpMyAdmin没有开启让登录再进入的功能,我们可以通过以下代码开启这项功能:

  打开phpMyAdmin根目录下的config.inc.php,按照以下行修改就可以了:

  1$cfgServers[$i]['auth_type']= 'cookie';

  这里的参数有三种,cookie是其中之一,其中还有两个参数是config和http,config的意思是: 按配置文件中的密码 (也就是标准方式) 这种方式没有认证;http : 使用HTTP认证;cookie : 使用COOKIE登录认证。如果是使用IIS+PHP的方式,则HTTP认证是无效的,这个功能只能在APACHE服务器环境下使用。 一般情况下,都是使用的COOKIE方式。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn