macos 当我尝试通过 http://localhost/xampp 主页使用它时,phpmyadmin 拒绝我访问
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5573672/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
phpmyadmin is denying me access when I try and use it through http://localhost/xampp homepage
提问by Christian
I am using a mac laptop running mac os x version 10.5.8 and I need to export a database to an .sql file so I can push it to github for a project. However when I attempt to use phpmyadmin for this through the localhost homepage, when I click on the link it responds with a page with just this error message:
我正在使用运行 mac os x 版本 10.5.8 的 mac 笔记本电脑,我需要将数据库导出到 .sql 文件,以便我可以将其推送到 github 进行项目。但是,当我尝试通过 localhost 主页为此使用 phpmyadmin 时,当我单击该链接时,它会响应一个页面,其中仅包含此错误消息:
MySQL said:
MySQL 说:
1045 - Access denied for user 'root'@'localhost' (using password: NO)
1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码: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.
phpMyAdmin 尝试连接 MySQL 服务器,服务器拒绝连接。您应该检查配置中的主机、用户名和密码,并确保它们与 MySQL 服务器管理员提供的信息相对应。
But it doesn't even prompt you for user information to begin with? is there something I am missing? someone please help
但它甚至没有提示您输入用户信息?有什么我想念的吗?有人请帮忙
采纳答案by schizodactyl
The problem is in your phpmyadmin configuration on the server.
问题出在服务器上的 phpmyadmin 配置中。
You can see the documentation here: http://www.phpmyadmin.net/documentation/#setup_script
您可以在此处查看文档:http: //www.phpmyadmin.net/documentation/#setup_script
The setting you are looking for is "$cfg['Servers'][$i]['auth_type']" - set this to 'HTTP', and you will be able to input a username and password.
您正在寻找的设置是“$cfg['Servers'][$i]['auth_type']” - 将其设置为“HTTP”,您将能够输入用户名和密码。
回答by Henry Disoza
To resolve the above error:-
要解决上述错误:-
a) Open Mysql console from the tray of WAMP server
a) 从 WAMP 服务器的托盘打开 Mysql 控制台
b) It will ask for password(you might have set this password earlier when u installed MySql in your system)(In my case it is admin)
b)它会要求输入密码(当你在你的系统中安装 MySql 时你可能已经设置了这个密码)(在我的情况下它是管理员)
c) Enter admin (press enter) Now it means your phpmyadmin is assuming no password for your MySql and unable to connect MySql but yor are able to connect your MySql Server by providing password
c) 输入 admin(按 Enter)现在这意味着您的 phpmyadmin 假设您的 MySql 没有密码并且无法连接 MySql 但您可以通过提供密码来连接您的 MySql Server
For this Open config.inc file from the below path C:\wamp\apps\phpmyadmin4.1.14 And replace this line
对于这个从下面的路径 C:\wamp\apps\phpmyadmin4.1.14 打开 config.inc 文件并替换这一行
$cfg['Servers'][$i]['password'] =' '; to `$cfg['Servers'][$i]['password'] = 'admin';
$cfg['Servers'][$i]['password'] =' '; 到`$cfg['Servers'][$i]['password'] = 'admin';
I hope it will work..
我希望它会起作用..
回答by Prasanta Dutta
Turn off your Firewall and then connect to phpmyadmin. It should open. Then turn on Firewall again. Worked for me.
关闭防火墙,然后连接到 phpmyadmin。它应该打开。然后再次打开防火墙。对我来说有效。