I came across this problem when I converted to a Mac and I was trying to connect to a MySQL database on MAMP using CocoaMySQL. CocoaMySQL wasn’t able to connect to the database. Thought the solution may be useful to others.

Settings

Host:localhost
User:root
Password:root

If you try to connect now you may get the following error:
Unable to connect to host localhost.
Be sure that the address is correct and that you have the necessary privileges.
MySQL said: Access denied for user ‘root’@'localhost’ (using password: YES)

CocoaMySQL error

Solution

So here’s the extra bit. Enter the following in the socket field:
/applications/mamp/tmp/mysql/mysql.sock

Picture 30.png

Happy days!

Lee Munroe Written with love from Lee Munroe.

Follow @leemunroe or subscribe to the blog for more web design articles.