修改了mysql的my.cnf可还是不行,启动后就是3307,必须关掉再启动。
觉得可能是mac系统在哪里写死了开机启动项。
http://queforum.com/mysql/1012987-mysql-install-mysql-osx-runs-port-3307-a.html
最后看到上面的文章。
In the System Preferences under MySQL, click the 'Automaticall Start MySQl Server on Startup' box.
This forces it to generate a launchDaemon in /Library/launchDaemons.
I then edited that file and changed the port to 3306 and restarted.
我的是一个叫/Library/launchDaemons/com.oracle.oss.mysql.mysqld.plist文件,修改里面的3307为3306即可。