Reputation: 2655
I previously had MySQL installed on my Mac before I installed MAMP. So before I installed MAMP, I removed my older version of MySQL using the following terminal commands:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.cnf
However when I try and run the MySQL server using MAMP with the default port of 3306, it will not connect. I get the error:
2002: Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) when trying to connect
But when I use any other port I am able to run MySQL server. So I have come to the conclusion that my older version of MySQL is still somehow hogging the default port.
Does anyone have a clue how to rid of this? Thanks.
Upvotes: 0
Views: 2106
Reputation: 70075
If you are correct that the old MySQL server is hogging the port, you can try to locate the process and kill it. But the easiest solution might be the nuclear option: Reboot your Mac.
If that doesn't solve it, then the problem is not the old version of MySQL hogging the port...
Upvotes: 1