Change port # for mysql on mac

后端 未结 6 829
甜味超标
甜味超标 2021-02-09 07:34

I just installed mysql on a mac running 10.6. The mysql version is 5.1.56. I need to have mysql run on port 3307. This article says we can change the port by modifying this file

6条回答
  •  我寻月下人不归
    2021-02-09 08:29

    I installed docker and was having problems with my company wanting to use port 3306 (which is what I was using privately).

    Similar problem to you. So this is what I did to fix it.

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

    Then you get a long list of script tags and

    Insert --port=3307 into the array. Make sure you put it under the other strings and within the array.

    I changed my port to 3307 instead of 3306 and now docker is working.

提交回复
热议问题