phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。

来源:互联网 发布:网络攻击 编辑:程序博客网 时间:2024/04/29 03:47

配置WAMPServer完成,测试phpMyAdmin出现错误:“phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。”因为之前我配MySql的时候自己设过密码为root,但是wamp认识的密码是初始的空密码,所以无法连接。现在就需要去修phpmyadmin 文件目录下的config.inc.php文件,编辑此文件,找到/* Authentication type and info */这句下面的$cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = ''; 改为:

$cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = 'root'; 

0 0