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

7 months ago J M

WELL WELL WELL . . . . All these years later and I finally figured out how to fix this problem! Though I don't understand WHY it works.

You have to add "sudo" to the launchd script! And that's it, it launches the database every time after that. But because it's a launchdeamon, it should already be running the rest of the command as root. So adding sudo should do absolutely nothing. And yet, it totally fixes it!! Go figure!

Note it's still in the LaunchDeamons folder, I didn't move it to LaunchAgents and I didn't add that odd LimitLoadToSessionType key. *shrug*

<key>ProgramArguments</key> <array> <string>/usr/bin/sudo</string> <string>/usr/local/opt/mariadb/bin/mariadbd-safe</string> <string>--datadir=/usr/local/var/mysql</string> </array>

This command should already being run as root, so the sudo part should not do anything. And yet thats what fixes it.

 
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.