我安装了Wamp5,打开它自带的phpMyAdmin 2.11.2.1,出现
"
phpMyAdmin 试图连接到 MySQL 服务器,但服务器拒绝连接。您应该检查 config.inc.php 中的主机、用户名和密码,并且确定这些信息与 MySQL 服务器的管理员所给出的信息一致。
 
错误
MySQL 返回: #1045 - Access denied for user 'root'@'localhost' (using password: NO) "w我php没有改过设置啊  不知道如何处理啊

解决方案 »

  1.   

    仔细检查下,是密码的问题。
    你的密码是否正确?
    而且config.inc.php文件中的空格和回车也要注意。
      

  2.   

    您应该检查 config.inc.php 中的主机、用户名和密码,并且确定这些信息与 MySQL 服务器的管理员所给出的信息一致。 --------------------------------------------
    config.inc.php中有主机、用户名、密码的设置。
      

  3.   

    你可以重新下载Phpmyadmin,然后不理睬config.inc.php文件,然后自己访问index.php网页,自己输入正确的用户名和密码(必须是正确),然后看一下是否能连接成功。(不需要config.inc.php一样可以工作的很好。)
      

  4.   


    那如何在mysql里查看主机、用户名、密码的设置情??况
      

  5.   

    mysql里?你不知道mysql的登录用户名和密码吗?
      

  6.   

    应该是你的密码不对。参考一下这个贴子,如何恢复你的ROOT的密码。
    http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html
      

  7.   

    config.inc.php文件:
    //----------------------------------------
    $cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
    $cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
    $cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
    $cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
    $cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
    $cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                        // (requires PHP >= 4.3.0)
    $cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                        // (this user must have read-only
    $cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                        // and "mysql/db" tables).
                                                        // The controluser is also
                                                        // used for all relational
                                                        // features (pmadb)
    $cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
    $cfg['Servers'][$i]['user']          = 'root';      // MySQL user
    $cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
    //----------------------------------------mysql 查询结果
    //----------------------------------------
    mysql> select host,user,password from mysql.user;
    +-----------+---------+-------------------------------------------+
    | host      | user    | password                                  |
    +-----------+---------+-------------------------------------------+
    | localhost | root    |                                           |//----------------------------------------都一样啊  没有发现不一样的啊
      

  8.   

    #1045无法连接目标主机.
    config.inc.php中没有设置好你的用户名和密码.查找 $cfg['Servers'][$i]['host'] = 'localhost';查找 $cfg['Servers'][$i]['auth_type'] = 'config'; 在自己的机子里调试用config;如果在网络上的空间用cookie,这里我们既然在前面已经添加了网址,就修改成cookie ,这里建议使用cookie.查找 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user(mysql用户名,自己机里用root;)查找 $cfg['Servers'][$i]['password'] = ''; // MySQL password (mysql用户的密码,自己的服务器一般都是mysql用户root的密码)
    cookie短语也得设置下,随便写,乱七八糟的字符串即可.用户名一般是root.如果你有另外添加mysql用户名另当别论.密码一般放空,也就是 用户名root 密码空.如果你真忘记密码,教你个方法,把文件中的$cfg['Servers'][$i]['auth_type'] = 'config'; 设置为config.然后从服务器机器的图形界面里面进去,这样不用填密码也可以进去,再phpmyadmin中在添加新的mysql用户即可.不过那也得你用的是win或者带图形的linux了.还有一种可能,你的mysql没有开启. 输入#service mysqld restart重启试试.也可以直接#mysql看看运行是否正常.mysql还未正常之前,先处理好mysql吧.
      

  9.   

    root没有使用密码,应该是默认的为空,修改下就可以了
      

  10.   

    我的环境配置是wamp5,在upload时,出现了access denied for user  ’root’@’localhost’ using password  yes 的error,开始是很困扰的,明明我没有改变设置呀,完全都是默认设置,查看了config.inc.php 也没有什么启示,没想到,我只是把数据库的密码改为空白,就轻易解决了问题。在此希望和我遇到同样问题可以作为参考,如果可以帮助到你,我会很高兴。