dongxiz5342 2014-08-03 06:07 采纳率: 100%
浏览 99

xampp phpmyadmin不起作用

2 messages occurring.

First one is:

MySQL said: Documentation

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

Second one is:

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

But I set password to mysql by command line.

  • 写回答

2条回答 默认 最新

  • duanfan5012 2014-08-03 06:16
    关注

    Since you update mysql user password from commandline, you have to change your config.inc.php file. By default there won't be password given for root user in phpmyadmin config file.

    You should change configuration in phpmyadmin config file to allow you to login using password.

    There will be config.inc.php in phpmyadmin directory. In that:

    Method 1 : If you want phpMyAdmin to automatically login.

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'config';
    /* Server parameters */
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'write_here_password';
    

    If you, configure this way It won't ask you for password to access phpmyadmin. It will use password from config file.

    Method 2 : If you want phpMyAdmin to show login screen and login manually.

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    

    This way, it will present you with login screen of phpMyAdmin where you can type username root and password for that user (the one you set from commandline).

    评论

报告相同问题?

悬赏问题

  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛