gpt4 book ai didi

mysql - MAMP 的 PHPMyAdmin 给我 #2002 mysql 错误

转载 作者:行者123 更新时间:2023-11-29 04:55:03 25 4
gpt4 key购买 nike

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

运行 /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.

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

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

然后我去MYSQL论坛看,建议检查my.cnf文件来检查某些值。但我无法在任何地方找到它。 MAMP中是否有其他具有相同功能的文件?

最佳答案

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

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

MySQL Forums :: Install :: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

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

ps -e|grep mysqld

sudo mysqld_safe

Thanks David Bocage for the tip.

关于mysql - MAMP 的 PHPMyAdmin 给我 #2002 mysql 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7293108/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com