Error #2002 Can’t connect to local MySQL server through socket ‘/Applications/MAMP/tmp/mysql/mysql.sock’ (2)

Test

If you attempt to start MySQL using the full path it should work

/Applications/MAMP/Library/bin/mysql -u root -p

Fix

If that works, then you can set it to work normally by running

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock

Resolution

Now MySQL should work normally

mysql -u root -p

Leave a Comment