Mac 上哪个用户应该拥有 /usr/local/mysql?
文件所有者和文件所有者应该做什么?组为 /usr/local/mysql
以及所有包含的文件和文件。目录? MySQL 工作正常,但是在我执行 sudo chown -R $USER:staff /usr/local
安装 Homebrew,MySQL 无法在启动时自动启动,并且在 MySQL 首选项面板上,我收到“警告:/usr/local/mysql/data 目录不属于 'mysql' 或 '_mysql'用户”,当我单击“启动 MySQL 服务器”时,它没有连接。
为了解决这个问题,我运行了 sudo chown -R _mysql:wheel /usr/local/mysql/data 。然后,我关闭了&打开系统偏好设置。警告消失了,当我单击“启动 MySQL 服务器”时,它启动了!
MySQL 现在似乎响应良好,但我只是猜测这个解决方案。我的做法正确吗?
What should the file owner & group be of /usr/local/mysql
and all contained files & directories? MySQL was working fine, but after I did sudo chown -R $USER:staff /usr/local
to install Homebrew, MySQL couldn't automatically start on startup, and on the MySQL Preferences panel, I got "Warning: The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' user," and when I clicked Start MySQL Server, it didn't connect.
To fix this, I ran sudo chown -R _mysql:wheel /usr/local/mysql/data
. Then, I closed & opened System Preferences. The warning went away, and when I clicked Start MySQL Server, it started!
MySQL seems to be responding fine now, but I just guessed at this solution. Is what I did correct?
对我来说看起来有效。这就是我的 mysql 文件夹的样子:
如果 MySQL 本身没有正确连接所有内容,你是如何安装 MySQL 的?
编辑:这是数据文件夹的一般风格:
我不在我的机器上运行Homebrew,所以我不知道这是否有很大帮助。
Looks valid to me. This is what my mysql folder looks like:
How did you install MySQL it if it didn't hook everything up correctly itself?
EDIT: and this is the general flavor of the data folder:
I don't run Homebrew on my machine, so I don't know if this is of much help as far as that goes.