How to connect to a MAMP MySQL database using CocoaMySQL

October 2008

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!

Receive more design content like this to your inbox

I promise not to spam you. No more than one email per week.

I blog and share links about web design, user experience, product development, HTML/CSS, email design and anything else I find interesting.

No thanks