zoukankan      html  css  js  c++  java
  • phpMyAdmin 尝试连接到MySQL 服务器的错误解决方法

    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

     

  • 相关阅读:
    gTest&gMock learning
    机器学习 delay learning
    c++ learning
    2017 湘潭邀请赛&JSCPC G&J
    mapreduce&GFS&bigtable learning
    golang learning
    高斩仙的北京历险记
    python learning
    Codeforces Round #448 (Div. 2) B
    python之callable
  • 原文地址:https://www.cnblogs.com/wuhenke/p/2009866.html
Copyright © 2011-2022 走看看