brew服务启动mysql vs mysql.server启动

时间:2018-03-07 17:06:09

标签: mysql homebrew

以下两者有什么区别?

date

我使用的是自制的mac os mysql(5.7.21)。

如果我使用命令打开mysql服务器

echo date("m-d-Y", $dataB1[0][0]["timestamp"]);

然后检查是否有mysql服务器,

brew services start mysql

mysql.server start

结果是

brew services start mysql

顺便说一句,如果我使用命令打开mysql服务器

brew services list

然后检查是否有mysql服务器,

mysql started

结果是

mysql.server start

他们都成功打开了mysql服务器。

我已使用命令

检查了它
brew services list

但为什么那个brewlist状态不同?

我只通过自制软件安装了mysql。

mysql stopped

所以我猜测mysql.server启动命令也与自制的mysql有关。

任何建议都将受到赞赏。

1 个答案:

答案 0 :(得分:2)

重启后,

brew services(一般服务)会自动重启;另一个(mysql.server start)不会。这就是区别。执行没有选项的命令应该产生,

tigger2:Downloads efrisch$ brew services
brew services [-v|--verbose] [list | run | start | stop | restart | cleanup] [...]
Easily start and stop formulae via launchctl.
With -v or --verbose, print more detail.

Integrates Homebrew formulae with macOS' launchctl manager. Services can be
added to either /Library/LaunchDaemons or ~/Library/LaunchAgents.
Basically, items in /Library/LaunchDaemons are started at boot, while those
in ~/Library/LaunchAgents are started at login.