MySQL说:文档#1045-拒绝用户'root'@'localhost'的访问(使用密码:NO) [英] MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO)

查看:68
本文介绍了MySQL说:文档#1045-拒绝用户'root'@'localhost'的访问(使用密码:NO)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了xampp,但是当我尝试运行它时,出现如下错误:

I installed xampp,but when I tried to run it I got an error as thus:

错误

MySQL表示:文档

MySQL said: Documentation

在配置中定义的controluser的连接失败. phpMyAdmin尝试连接到MySQL服务器,服务器拒绝连接.您应该检查配置中的主机,用户名和密码,并确保它们与MySQL服务器管理员提供的信息相对应.

Connection for controluser as defined in your configuration failed. 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.

我试图在Internet上搜索解决方案,但仍然无法解决问题.我已经检查了config.inc.php文件中是否使用了密码,但是没有使用任何密码.此外,当我尝试使用密码进行访问时,仍然无法解决此问题.

I tried to search on internet for a solution, but I still can't fix my problem. I have already checked whether I used a password or not in config.inc.php file but i have not used any password.Also, when i try to access with a password, I still can't solve this problem.

我希望有人能帮助我.谢谢

I hope anyone can help me. .thank you

推荐答案

phpMyAdmin 中更改root用户的密码后,我遇到了这个问题.我对编程一无所知,但通过执行以下操作解决了该问题:

I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following:

  1. 转到文件C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php(如果您不使用Wamp Server,我想您应该用服务器的名称替换"wamp")

  1. Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace "wamp" with the name of your server if you're not using Wamp Server)

找到行$cfg['Servers'][$i]['password']=''并将其更改为

$cfg['Servers'][$i]['password']='NO'

  • 尝试再次打开 phpMyAdmin ,希望该消息现在显示为拒绝用户'root'@'localhost'的访问(使用密码:YES)

  • Try opening phpMyAdmin again, and hopefully the message will now read "Access denied for user 'root'@'localhost' (using password: YES)

    现在将上一行中的密码更改为"您的密码"(无论您之前将密码设置为什么)

    Now change the password in the above line to 'yourpassword' (whatever you had set it to before)

    希望这对某人有帮助.

    这篇关于MySQL说:文档#1045-拒绝用户'root'@'localhost'的访问(使用密码:NO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆