I also keep some 'useful' data locally but could not maintain a connection to the cloud and my local DB as they are both by default running off port 3306.
I wasted the better part of a day trying to figure out how to change the port (the my.cnf file is ignored when mySQL runs as a service).
The LaunchDaemon folder
Code: Select all
/Library/LaunchDaemons
Code: Select all
com.oracle.oss.mysql.mysqld.plist
Code: Select all
--port=3307
What none of the online advice mentions is that the plist file will try to launch with Xcode which will break the plist file.
Instead, what is required is that you first run
Code: Select all
sudo plutil -convert xml1 com.oracle.oss.mysql.mysqld.plist
You can then update the ProgramArguments key to look something like this:
Code: Select all
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld</string>
<string>--user=_mysql</string>
<string>--basedir=/usr/local/mysql</string>
<string>--datadir=/usr/local/mysql/data</string>
<string>--plugin-dir=/usr/local/mysql/lib/plugin</string>
<string>--port=3307</string>
<string>--log-error=/usr/local/mysql/data/mysqld.local.err</string>
<string>--pid-file=/usr/local/mysql/data/mysqld.local.pid</string>
<string>--keyring-file-data=/usr/local/mysql/keyring/keyring</string>
<string>--early-plugin-load=keyring_file=keyring_file.so</string>
</array>