Comments - Launching MariaDB on Boot on macOS (10.15 Catalina)

1 year, 11 months ago Paul Emerton

Coming to this belatedly, having only just tried MariaDB on macOS Catalina 10.15.7.

I installed [email protected] via Homebrew. I had the same problem, namely that it wouldn't be running until I'd logged in as a user on the Mac.

The changes which appear to have made the difference were: 1) Setting permissions of the [email protected] file so 'system' is the owner. 2) Placing the [email protected] file into /Library/LaunchAgents rather than LaunchDaemons.

MariaDB has now started successfully on the several occasions the Mac has been restarted over the last 48 hours.

The /Library/LaunchAgents/[email protected] file contains:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-AppleDTD PLIST 1.0EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>[email protected]</string> <key>LimitLoadToSessionType</key> <array> <string>Aqua</string> <string>Background</string> <string>LoginWindow</string> <string>StandardIO</string> <string>System</string> </array> <key>ProgramArguments</key> <array> <string>/usr/local/opt/[email protected]/bin/mysqld_safe</string> <string>--datadir=/usr/local/var/mysql</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>/usr/local/var</string> </dict> </plist>

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.