提示你那么做的人,没有看过PMA的设置教程。PMA的认证有好几种,如果用cookie——PMA推荐的方式,比较安全一点,至少要设置这么几行:/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'your secret pass phrase'; /* YOU MUST FILL IN
THIS
FOR
COOKIE AUTH! *//* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'your secret pass phrase'; /* YOU MUST FILL IN
THIS
FOR
COOKIE AUTH! *//* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
进入相关目录中的\libraries目录,找到 config.default.php文件copy份到上级目录,并命名为config.inc.php ;
在config.inc.php中
找到 $cfg['PmaAbsoluteUri']
修改你将用于让虚机用户访问的phpMyAdmin的网址
如:$cfg['PmaAbsoluteUri'] = 'http://ip/phpmyadmin/'; 或$cfg['PmaAbsoluteUri'] = 'http://ip:8899' (写出访问phpMyAdmin的绝对URL)
还有这些更改的地方:
$cfg['Servers'][$i]['host'] = 'localhost';(通常用默认,也有例外)
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
用cookie。因为是网络上使用所以这里选择cookie
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed自己机里不用设置)
注:$cfg['blowfish_secret'] = '';
本机的话不需要设置,但是网络的话需要设置成cookie:
$cfg['blowfish_secret'] = 'cookie';
设置完毕。
3、打开IE,输入http://ip/phpmyadmin/(当然你设置不同就用那个网址。),输入用户名和密码后,用phpmyadmin浏览相应的mysql数据库;
如果设置$cfg['Servers'][$i]['auth_type'] = 'cookie'; 所以显示会要求输入帐号。
4、$cfg['DefaultLang'] = 'zh'; (这里是选择语言,zh代表简体中文的意思)
我比较懒,都是用xampp和wamp,
$i = 0;
$cfg['blowfish_secret'] = 'huo';/*
* First server
*/
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';