Change port # for mysql on mac

后端 未结 6 828
甜味超标
甜味超标 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:28

    On MacOs High Sierra running MySql v8 server, you need the following:

    1. Edit /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

    2. Under ProgramArguments, you will see many entries with ... etc,

    3. Add the following line: --port=16000

    Also, to restart you need to do the following:

    launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    

    and then

    launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    

    I hope this helps.

提交回复
热议问题