本文介绍了phpmyadmin-错误2002-在Mac上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用Mac,并且正在运行的OS版本是El Capitan. Web根是/Users/username/Sites.

I'm currently using Mac, and the running OS version is El Capitan. The web root is /Users/username/Sites.

我下载并解压缩了phpmyadmin并将目录移到了根文件夹,然后设法进入了登录屏幕.但是当我尝试登录时,它会显示类似这样的消息.

I downloaded, extracted the phpmyadmin and moved the directory to the root folder, and I managed to get to the log in screen. But when I try to log in, it shows a message like this.

#2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured).

我检查了MySQL是否已关闭,但是它已打开,因此与之无关.有人知道如何解决这个问题吗?

I checked out if MySQL was turned off, but it was on so it doesn't have to do with that. Does anybody know how to solve out this matter?

推荐答案

因此,对于我的情况,解决方案非常简单.

So the solution was fairly simple for my case.

在阅读了诸如,我查看了phpmyadmin目录以找到config.inc.php文件.这是我仍然没有弄清楚的东西,但是没有同名的文件.

After reading some articles like this, I viewed my phpmyadmin directory to find the config.inc.php file. This is what I still haven't figured out but there was no file with the same name.

相反,名称最接近的文件是config.sample.inc.php,所以我更改了其文件名并将$cfg['Servers'][$i]['host'] = 'localhost';更改为$cfg['Servers'][$i]['host'] = '127.0.0.1';.现在,我可以使用phpmyadmin帐户登录.

Instead, the file with the closest name was config.sample.inc.php, so I changed its file name and changed $cfg['Servers'][$i]['host'] = 'localhost'; to $cfg['Servers'][$i]['host'] = '127.0.0.1';. Now I can log in with the phpmyadmin account.

这篇关于phpmyadmin-错误2002-在Mac上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 06:20