开发者社区> 问答> 正文

修复对phpMyAdmin用户'root'@'localhost'的访问被拒绝的问题?mysql

我在PC上使用WAMP Server 2.2。在phpMyAdmin(版本5.5.24)中,我编辑了“ root”用户(带有“ localhost”主机),并为其指定了密码“ root”。原来,这是我要恢复的重大错误。现在,当我转到localhost / phpmyadmin /时,我会在左侧看到数据库菜单,但是主框架显示错误消息:

#1045 - Access denied for user 'root'@'localhost' (using password: NO) 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. 如果我转到127.0.0.1/phpmyadmin,则不会收到该错误,并且一切正常。

我尝试将用户的密码改回无密码。我尝试修改config.inc.php文件以添加新密码(但这使phpMyAdmin完全出错);我尝试删除并重新创建root / localhost用户。似乎没有任何作用。root / localhost用户似乎没有密码和所有特权,但是错误仍然存​​在。

有什么想法或如何使该用户的访问权限恢复正常,而不必重新安装WAMP?

展开
收起
保持可爱mmm 2020-05-17 11:44:51 513 0
1 条回答
写回答
取消 提交回答
  • 在此config.inc文件下查找文件,C:\wamp\apps\phpmyadmin3.5.1找到这一行

    $cfg['Servers'][$i]['password'] ="; 并替换为

    $cfg['Servers'][$i]['password'] = 'Type your root password here';来源:stack overflow

    2020-05-17 12:01:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像