找不到 mysql.sock

2021-12-11 00:00:00 sockets macos installation mysql

我只需要重新安装 mysql,但在启动时遇到了问题.它找不到套接字(mysql.sock).问题是我也不能.在我的 Mac OS X 10.4 终端中,我输入:locate mysql.sock,然后返回 /private/tmp/mysql.sock.套接字文件存在于该位置是有道理的,但实际上并不存在.

I just had to re-install mysql and I am having a problem starting it up. It cannot find the socket (mysql.sock). The problem is that neither can I. In my Mac OS X 10.4 terminal, I type: locate mysql.sock, and I get back /private/tmp/mysql.sock. It makes sense that the socket file exist in that location, but it actually does not.

  1. 如何找到套接字文件?

  1. How can I find the socket file?

如果 locate 返回一个错误的位置,它必须有某种内存和可能的索引.如何刷新该索引?

If locate is returning a false location, it must have some sort of memory and probably indexes. How can I refresh that index?

推荐答案

回答你问题的第一部分:

to answer the first part of your question:

运行

% mysqladmin -p -u <user-name> variables

并检查socket"变量

and check the 'socket' variable

相关文章