3

As it says above. When I run mysqld using the preference pane for MySql, one of the arguments it is providing is --port=3307.

Does anyone know how I might go about changing this?

Operating System is OSX 10.10.4
MySQL version is 5.6.26

Mourdos
  • 133

1 Answers1

7

You may change the port in the file com.oracle.oss.mysql.mysqld.plist file in /Library/LaunchDaemons by editing it with

sudo nano /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

Change the port at

  <string>--port=3307</string>

near the end of the file to whatever you need it to be and reboot your Mac or restart the service.

klanomath
  • 66,391
  • 9
  • 130
  • 201
  • I tried that on OSX 10.10.5, and only see binary data in Nano. Running file /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist gives me Apple binary property list. Am I doing something wrong or has this changed somehow very recently? – MJV Aug 28 '15 at 10:52
  • 2
    @MJV Please change the plist format with plutil -convert xml1 some_file.plist. You may have to prepend "sudo" – klanomath Aug 28 '15 at 10:57
  • Thank you! I learned something new again. (Probably should have googled that myself, though.) Went with JSON but that's a personal preference. – MJV Aug 28 '15 at 12:14