Contains tips for configurators working with Aware IM
#46274 by PointsWell
Fri Feb 16, 2018 12:25 am
So I spent the better part of a day trying to change the default port on mySQL on my desktop. Why? I have a remote server that AIM runs off and I can connect to by an SQL proxy (thereby keeping my database without an external IP address).

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

Contains a file
Code: Select allcom.oracle.oss.mysql.mysqld.plist


All advice online points to editing this to add a program parameter of
Code: Select all--port=3307
(or whatever port you want to use).

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 allsudo plutil -convert xml1 com.oracle.oss.mysql.mysqld.plist


before using nano or vi to edit the file.

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>


That was the least inspiring day of my month so far...

Who is online

Users browsing this forum: No registered users and 4 guests