MAMP 的 PHPMyAdmin 给我 #2002 mysql 错误 [英] PHPMyAdmin of MAMP giving me #2002 mysql error

查看:53
本文介绍了MAMP 的 PHPMyAdmin 给我 #2002 mysql 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,只有当我转到本地 PhpMyAdmin 窗口时,才会收到 #2002 消息.我在网上搜索,我找到了一个终端命令来检查 Mysql 是否会首先运行,并且确实如此.

So only when I go to my local PhpMyAdmin window, I get the #2002 message. I searched the net and I found a terminal command to check if Mysql would be running in the first place and it does.

运行 /Applications/MAMP/Library/bin/mysql -u root -p

给我

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.5.9 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

我认为这看起来不错,所以错误一定与此无关.

That doesn't look bad I think so the error must not have much to do with that.

我读到在 config.inc.php 文件中,您将值 'localhost' 替换为 '127.0.0.1' 但这并没有改变情况.

I read that there's the config.inc.php file where you replace the value 'localhost' with '127.0.0.1' but that didn't change the situation.

然后我在 MYSQL 论坛中寻找建议检查 my.cnf 文件以检查某些值.但我在任何地方都找不到.MAMP中是否有其他文件具有相同的功能?

Then I went looking in MYSQL forums it is suggested to check the my.cnf file to check for certain values. but I can't find it anywhere. Is there another file that has the same function in MAMP?

推荐答案

由于最高投票的答案托管在已不存在的 Posterous 上,因此这有点孤儿.内容是存档在 Archive.org 但以防万一 也消失了,链接的答案是:

Since the top-voted answer was hosted on Posterous, which no longer exists, this is a bit of an orphan. The content is archived at Archive.org but just in case that goes away, too, the linked answer was:

今天,我尝试使用 SQL Packager 在 OS X Lion 上安装 Mysql.我遇到了 很常见的问题:

Today, I tried to install Mysql on OS X Lion using SQL Packager. I faced a very common issue:

MySQL 论坛 :: 安装 :: ERROR 2002 (HY000):无法通过套接字/tmp/mysql.sock"连接到本地 MySQL 服务器 (2)

事实证明你可以在终端中重新生成这个文件:

Turns out you can regenerate this file in the terminal with this:

ps -e|grep mysqld

sudo mysqld_safe

感谢 David Bocage 的提示.

这篇关于MAMP 的 PHPMyAdmin 给我 #2002 mysql 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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