douhuan1937 2016-10-08 08:25 采纳率: 0%
浏览 2040

无法连接到MySQL:用户'root'@'localhost'拒绝访问

Could not connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO)

我不能使用用户名(Root)访问我的数据库,也不能使用任何密码,我该怎么办?我也不能通过MySQL控制台访问。我试图配置config.inc.php文件,但没有作用。

请告诉我如何不丢弃WAMP,也不需要重新装载。

十分感谢

Aleksandar

  • 写回答

1条回答 默认 最新

  • douzhengzuo7283 2016-10-09 10:33
    关注

    It seems that you have forgotten your mysql root user password. I think you should reinstall WAMPP and then set the mysql root user password from command line. To set the mysql root user password you have to first login to mysql from command line using this command: mysql -u root. When it asks for password just enter. After that enter following commands:

    SET PASSWORD for 'root'@'localhost' = password('enteryourpassword');
    SET PASSWORD for 'root'@'127.0.0.1' = password('enteryourpassword');
    SET PASSWORD for 'root'@'::1' = password('enteryourpassword');
    
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码