Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I start MariaDB on boot on Mac OS X?

Tags:

macos

mariadb

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.

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.

like image 737
Grant Birchmeier Avatar asked Jul 04 '13 02:07

Grant Birchmeier


People also ask

Which command is use to start MariaDB service on every boot of OS?

Once the installation is complete, we'll start the daemon with the following command: sudo systemctl start mariadb.


2 Answers

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.

like image 38
Grant Birchmeier Avatar answered Oct 31 '22 22:10

Grant Birchmeier


From brew info 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.

like image 119
Sucipto Avatar answered Oct 31 '22 23:10

Sucipto