Skip to content

Instantly share code, notes, and snippets.

@masasdani
Created November 19, 2015 06:31
Show Gist options
  • Save masasdani/6cd2677917dde677eb14 to your computer and use it in GitHub Desktop.
Save masasdani/6cd2677917dde677eb14 to your computer and use it in GitHub Desktop.
macos create auto start app
#location
#/Library/LaunchDaemons
#name
#com.mysql.mysql.plist
#sudo chown root /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo chgrp wheel /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<string>--user=mysql</string>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment