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)

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

Happy days!

















Ah, yes I remember this form when I first setup MAMP/CocoaMySQL. Actually, I tend to use MySQL Tools’ Administrator and/or Query browser for my MySQL needs and don’t use CocoaMySQL but perhaps I should give it another whirl.
Thanks for the tip, CocoaMySQL (now Sequel Pro) works great, one question though, is it possible to connect to a MySQL database that´s not on my computer?
@JesperA: Yes you should be able to, as long as your host allows it
I have spent ages trying to figure this out. I put in my very specific google query with little hope of an answer and here it is! Thankyou thankyou thankyou!
thanks a million! That was just the information I needed…