MySQL 说:文档 #1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:否)
我安装了 xampp,但是当我尝试运行它时,我得到了一个错误:
I installed xampp,but when I tried to run it I got an error as thus:
错误
MySQL 说:文档
您的配置中定义的 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.
我试图在互联网上搜索解决方案,但我仍然无法解决我的问题.我已经检查了我是否在 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:
转到文件
C:wampappsphpmyadmin3.2.0.1config.inc.php
(如果你没有使用 Wamp 服务器)
Go to file
C:wampappsphpmyadmin3.2.0.1config.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']=''
行并将其更改为
Find the line $cfg['Servers'][$i]['password']=''
and change this to
$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)
现在将上述行中的密码更改为yourpassword"(您之前设置的任何密码)
Now change the password in the above line to 'yourpassword' (whatever you had set it to before)
希望这对某人有所帮助.
Hope this helps somebody.
相关文章