phpMyAdmin中config.inc.php设置密码和修改密码的方法

phpMyAdmin有3种受权模式:
1. cookie: 显示一个web登陆页面,输入mysql的用户名和密码,而后进入管理界面。
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
   
2. http: 显示1个windows登陆框,输入mysql的用户名和密码,然和进入管理.
$cfg['Servers'][$i]['auth_type'] = 'http';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


3. config: 把mysql用户名和密码直接填入config.inc.php,不显示登陆界面,直接进入管理界面 。
    config模式须要这几个参数,以下:
    $cfg['Servers'][$i]['auth_type'] = 'config'; 
     $cfg['Servers'][$i]['user'] = 'root';         
     $cfg['Servers'][$i]['password'] = 'root';
   
phpMyAdmin的配置文件名为config.inc.php,各版本的config.inc.php修改方法以下: 2.6之前版本:将config.inc.sample.php改成 config.inc.php 2.7版本:将config.default.php改成config.inc.php 2.8版本:用配置脚本 ‘/script/setup.php’生成配置文件,生成的文件拷贝下来,手动存为config.inc.php
相关文章
相关标签/搜索