I use MySQL on my main Mac (M1 iMac, latest Sonoma, MySQL v8.3.0-arm64), and in its preference pane, I have the "Start MySQL when your computer starts up" option enabled.
It NEVER starts automatically anymore, though it did so for years until recently (on earlier machines/OS versions).
Instead I now must always start MySQL manually (from its preference pane), which generates the dialog saying "legacyLoader-arm64 (System Settings) wants to make changes.", requiring me to authenticate with a password.
It then starts without further issue.
This feels more to me like an issue with legacyLoader-arm64, not necessarily with MySQL, but either way, what can I do to make this annoying problem stop, so MySQL will start automatically again?
2
Answers
UPDATE:
Not sure why my original question gets downvoted, but I figured out the issue.
So for any others who might stumble into it, the fix was to change the ownership of the files in /usr/local/mysql-8.3.0-macos14-arm64/data from root to _mysql, specifically binlog.index (and possibly others).
(My MySQL directory name is mysql-8.3.0-macos14-arm64, yours may vary.)
@Ndmistry555, thanks, but I'm not sure if your advice would have helped - I already had an existing .plist file for mysql, albeit with a different name (com.oracle.oss.mysql.mysqld.plist).
Also, I couldn't really try out your suggestion without knowing what to put in a new .plist file more explicitly. Might not matter though, because simply correcting the file ownership issue seems to have worked.
Create a Launchd plist file :
/Library/LaunchDaemons/com.mysql.mysql.plist "Format: XML" and
"Unicode (UTF-8)" and save
permissions for the list:
sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
then
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
At last Restart your Mac