phpMyAdmin提示“Access denied for user 'root'@'localhost' (using password: NO)”的解决办法

一、错误内容

 在用thinkPHP登陆phpMyAdmin时遇到以下错误

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

phpMyAdmin 试图连接到 MySQL 服务器,但服务器拒绝连接。您应该检查 config.inc.php 中的主机、用户名和密码,并且确定这些信息与 MySQL 服务器的管理员所给出的信息一致。

二、解决方法如下:

  打开C:\wamp\apps\phpmyadmin4.1.14\config.inc.php里看到里面有两行就是问题的关键:将密码填进去即可

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
posted @ 2016-10-28 09:19  wtan  阅读(7575)  评论(0编辑  收藏  举报