phpMyAdmin有3種受權模式:
1. cookie: 顯示一個web登陸頁面,輸入mysql的用戶名和密碼,而後進入管理界面。
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$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