phpMyAdmin抛出#2002无法登录到mysql服务器phpmyadmin [英] phpMyAdmin is throwing a #2002 cannot log in to the mysql server phpmyadmin

查看:109
本文介绍了phpMyAdmin抛出#2002无法登录到mysql服务器phpmyadmin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在本地计算机上安装了MySQL服务器企业版5.1,现在我想安装phpMyAdmin,但是它不起作用.

I have installed MySQL server enterprise 5.1 on my local machine and now I want to install phpMyAdmin, but it does not work.

我已将phpMyAdmin取消注册到我的服务器根目录,并浏览到"localhost/phpMyAdmin/setup/index.php",启动了新服务器,我唯一更改的设置是在"Password for config"字段中填写我的MySQL密码.验证"

I have unrared phpMyAdmin to my server root directory and browsed to "localhost/phpMyAdmin/setup/index.php", started a new server and the only setting I changed was filling in my MySQL password in the field "Password for config auth"

所以现在当我尝试登录时,我收到一条错误消息,提示#2002无法登录到mysql服务器phpmyadmin"

So now when I am trying to log in I get an error message saying "#2002 cannot log in to the mysql server phpmyadmin"

有人知道怎么了吗?从昨天开始我就一直遇到这个问题.

Does anyone know what's wrong? I've been having this problem since yesterday.

推荐答案

如果登录phpmyadmin时出现#2002 Cannot log in to the MySQL server错误,请尝试编辑phpmyadmin/config.inc.php并更改:

If you're getting the #2002 Cannot log in to the MySQL server error while logging in to phpmyadmin, try editing phpmyadmin/config.inc.php and change:

$cfg['Servers'][$i]['host'] = 'localhost';

收件人:

$cfg['Servers'][$i]['host'] = '127.0.0.1';

来自 Ryan的博客的解决方案

修改(2015年3月20日):

请注意,如果您是全新安装,则config.inc.php可能不存在.您需要重命名/复制config.sample.inc.php,然后更改相关行

Note that if you're on a fresh install, config.inc.php may not exist. You need to rename / copy config.sample.inc.php and then change the relevant line

这篇关于phpMyAdmin抛出#2002无法登录到mysql服务器phpmyadmin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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