开发者

Launchd and user mappings

开发者 https://www.devze.com 2023-01-22 02:54 出处:网络
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=my

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.


Just have launchd run exactly the command you would normally run. The one change would be to use an absolute path to mysqld_safe. mysqld_safe will then spawn a mysql process running as the user mysql, and you'll be back in familiar territory.

0

精彩评论

暂无评论...
验证码 换一张
取 消