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).

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP