phpmyadmin自動登陸和取消

如何將安裝的 phpmyadmin 設置爲自動登陸?



首先在根目錄找到config.sample.inc.php複製一份文件名改爲config.inc.php(如果已經存在 config.inc.php 文件,則直接修改該文件即可)。


打開config.inc.php 找到 $cfg['Servers'][$i]['auth_type'] 

將 $cfg['Servers'][$i]['auth_type'] = 'cookie';

中的 cookie 改成 http 或者 config 

即 

$cfg['Servers'][$i]['auth_type'] = 'http';

或者 

$cfg['Servers'][$i]['auth_type'] = 'config';


然後在下面加上如下代碼:

$cfg['Servers'][$i]['user']          = 'root';      // 設置的mysql用戶名

$cfg['Servers'][$i]['password']      = '123′;       // 設置的mysql密碼


$cfg['Servers'][$i]['AllowNoPassword'] = true;  //允許空密碼


保存即可。



如果想取消phpmyadmin自動登陸?


只需把

$cfg['Servers'][$i]['auth_type'] = 'http'; 

改成

$cfg['Servers'][$i]['auth_type'] = 'cookie';

保存即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章