If enabling “Automatically Start MySQL Server on Startup” does not work then doing below process will fix it.
Open terminal/command line interface (CLI) and run below commands.
- run “sudo vi /Library/LaunchDaemons/com.mysql.mysql.plist” and add below code and save the file. If vi does not work then create file “com.mysql.mysql.plist” in “/Library/LaunchDaemons/” and save below code.
<?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>
</array>
</dict>
</plist> - sudo chown root: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
Now restart the system and see that MySQL will be in running mode and no need to manually start.