如何在Mac OS X上启动MariaDB ?

时间:2022-04-10 02:44:28

Just installed MariaDB (with homebrew). Everything looks like it's working, but I can't figure out how to have it automatically startup on boot on my Mac. I can't find any Mac-specific docs for this.

刚刚安装了MariaDB(带有自制程序)。一切看起来都很正常,但我不知道如何在Mac电脑上自动启动它。我找不到任何与Mac相关的文档。

The installation output says:

安装输出说:

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

I guess I don't know where the right place is.

我想我不知道在哪里合适。

4 个解决方案

#1


10  

With help from Calvin's answer (deleted, I guess?), and this page, these are the steps I used to accomplish this:

在加尔文的回答(我猜是删除了吧?)和这一页的帮助下,这些是我用来实现这个目标的步骤:

cp /usr/local/Cellar/mariadb/5.5.30/homebrew.mxcl.mariadb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

On next boot, MariaDB was up and running.

接着,MariaDB又开始运行了。

#2


8  

From brew info mariadb

从酿造信息mariadb

To have launchd start mariadb now and restart at login:
  brew services start mariadb
Or, if you don't want/need a background service you can just run:
  mysql.server start

Just run brew services start mariadb on terminal.

在终端上运行brew服务启动mariadb。

#3


6  

If you install MariaDB by Homebrew, you can use this to see how to start your mariadb at login.

如果您通过Homebrew安装MariaDB,您可以使用它查看如何在登录时启动MariaDB。

brew info mariadb

To have launchd start mariadb at login:

在登录时启动mariadb:

ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents

Then to load mariadb now:

然后现在装载mariadb:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

Or, if you don't want/need launchctl, you can just run:

或者,如果你不想/不需要launchctl,你可以运行:

mysql.server start

#4


2  

You need to use launchd. See $ man launchd.

你需要使用launchd。看到男人launchd美元。

Additionally, Nathan wrote a good article on launchd.

此外,Nathan还写了一篇关于launchd的好文章。

#1


10  

With help from Calvin's answer (deleted, I guess?), and this page, these are the steps I used to accomplish this:

在加尔文的回答(我猜是删除了吧?)和这一页的帮助下,这些是我用来实现这个目标的步骤:

cp /usr/local/Cellar/mariadb/5.5.30/homebrew.mxcl.mariadb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

On next boot, MariaDB was up and running.

接着,MariaDB又开始运行了。

#2


8  

From brew info mariadb

从酿造信息mariadb

To have launchd start mariadb now and restart at login:
  brew services start mariadb
Or, if you don't want/need a background service you can just run:
  mysql.server start

Just run brew services start mariadb on terminal.

在终端上运行brew服务启动mariadb。

#3


6  

If you install MariaDB by Homebrew, you can use this to see how to start your mariadb at login.

如果您通过Homebrew安装MariaDB,您可以使用它查看如何在登录时启动MariaDB。

brew info mariadb

To have launchd start mariadb at login:

在登录时启动mariadb:

ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents

Then to load mariadb now:

然后现在装载mariadb:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

Or, if you don't want/need launchctl, you can just run:

或者,如果你不想/不需要launchctl,你可以运行:

mysql.server start

#4


2  

You need to use launchd. See $ man launchd.

你需要使用launchd。看到男人launchd美元。

Additionally, Nathan wrote a good article on launchd.

此外,Nathan还写了一篇关于launchd的好文章。