I was using MAMP and have removed it completely from my MAC OS. Post this,
- I installed mysql5.7 using brew
- Added mysql path to zshrc / bash profile
- Started mysql service using
brew services start [email protected]
Now when I try to access mysql on command line it gives me error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
Where as I have already added socket path to /tmp/mysql.sock in my.cnf as well as tried creating symlink of same to ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) but no luck.
Advice on same will be highly appreciated!
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
as a workaround – Amadavatbrew services list
? – Geminius/tmp/mysql.sock
? Is this an absolute path? and the error searches at/tmp/mysql/mysql.sock
? or/Applications/MAMP/tmp/mysql/mysql.sock
? – Herpes