

Yosemite - MAMP - Unable to connect to local MySQL server via socket '/Applicati...
source link: https://www.codesd.com/item/yosemite-mamp-unable-to-connect-to-local-mysql-server-via-socket-applications-mamp-tmp-mysql-mysql-sock-2.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Yosemite - MAMP - Unable to connect to local MySQL server via socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
I have problem when I try to connect to MySQL MAMP :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
I'm doing research but I have not found a solution to my problem, I try to link mysql.sock like this :
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
But, the file /tmp/mysql.sock doesn't exist.
Do you have any ideas ? The problem is blocking me for 2 days, I searched for this time but nothing good for me.
Thanks in advance,
I had the same problem. I solved it following these steps:
- I stopped and restarted MySQL via System Preferences -> MySQL (see also https://stackoverflow.com/a/26523977/204807)
- I entered
sudo mysql_upgrade
in a terminal window, and pressed enter
After the update process I was able to connect with my MySQL.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK