无痕客

落花无情,流水无痕……

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

xampp刚装好是,出现如下问题。

- Access denied for user ‘root’@‘localhost’ (using password: YES)
使用配置文件中定义的控制用户连接失败。
phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝连接。您应该检查配置文件中的主机、用户名和密码,并确认这些信息与 MySQL 服务器管理员所给出的信息一致。

解决方法如下:
找到系统文件夹中的\...phpMyAdmin\config.inc.php配置文件
把auth_type改为http,并且把password改成我自己设的123。

  /* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

然后点击phpmyadmin,在图形化操作界面将mysql密码设为123。问题解决。

我出现问题是因为密码设置处丢失,设置为正确的密码即可,我并没有$cfg['Servers'][$i]['auth_type'] = 'config';改为“http”

参考内容:http://hi.baidu.com/lwbqqyumidi/blog/item/b7f6a6d94d86e4e077c6380a.html

 

posted on 2011-04-08 20:02  无痕客  阅读(5421)  评论(0编辑  收藏  举报