启动和用户映射
我试图让 MySQL 在 launchd 下运行,因此我设置了一个 launchd 项,其中包含一个“UserName”键,其中“mysql”作为值。我这样做是因为当我启动 mysql 时,我通常会执行:mysqld_safe --user=mysql。
当我加载它时,我得到:
10/22/10 11:13:02 AM com.apple.launchd[1] (com.mysql.mysqld463) Suspicious setup: User "mysql" maps to user: _mysql
10/22/10 11:13:02 AM com.apple.launchd[1] (com.mysql.mysqld) Throttling respawn: Will start in 10 seconds
MySQL 永远不会运行。我应该使用“_mysql”作为用户吗?我想知道用户映射,因为我按照 MySQL 发行版中包含的说明安装了数据库:使用 mysql 用户安装数据库并运行守护程序。
先感谢您。
I'm trying to get MySQL to run under launchd so I set up a launchd item including a "UserName" key with "mysql" as value. I did this because when I start mysql I usually go: mysqld_safe --user=mysql.
When I load it, I get:
10/22/10 11:13:02 AM com.apple.launchd[1] (com.mysql.mysqld463) Suspicious setup: User "mysql" maps to user: _mysql
10/22/10 11:13:02 AM com.apple.launchd[1] (com.mysql.mysqld) Throttling respawn: Will start in 10 seconds
And MySQL never gets to run. Should I use "_mysql" as the user? I wonder about user mappings because I installed my databases following instructions included in MySQL distribution: using the mysql user to install databases and to run the daemon.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需让
launchd
运行您通常运行的命令即可。一个更改是使用mysqld_safe
的绝对路径。然后,mysqld_safe
将生成一个以mysql
用户身份运行的mysql
进程,然后您将回到熟悉的区域。Just have
launchd
run exactly the command you would normally run. The one change would be to use an absolute path tomysqld_safe
.mysqld_safe
will then spawn amysql
process running as the usermysql
, and you'll be back in familiar territory.