I'm adding a launchd file for MySQL that I don't want to be automatically started. Just wondering what I should change in the file.
/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>
Change your
KeepAlive
key toThis will restart your job when
mysqld
has crashed or terminated with an error code. TheAfterInitialDemand
subkey makes sure the job is not started when loaded.