有时候频繁输密码很烦躁,那么怎么设置自动登录呢
首先在根目录找到 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';
然后在下面加上如下代码:
1 |
$cfg [ 'Servers' ][ $i ][ 'user' ] = 'root' ; // 设置为你自己的mysql用户名 |
2 |
$cfg [ 'Servers' ][ $i ][ 'password' ] = '123′; // 设置为你自己的mysql密码 |
保存即可。
如果想取消phpmyadmin自动登陆。只需把
$cfg['Servers'][$i]['auth_type'] = 'http';
改成
$cfg['Servers'][$i]['auth_type'] = 'cookie';
保存即可。
还没有人抢沙发呢~