Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Navicat Premium 10.1.1 and MAMP PRO 2.1.4.

MAMP PRO is set to use the port 3306 for MySQL. When I try to create a new MySQL connection in Navicat, I set the hostname as localhost, port as 3306, username and password as root. But, when testing connection, it shows "Can't connect to MySQL server on '127.0.0.1' (61)".

Does someone know what can be the problem?

Notes:

  1. MAMP PRO is already started;
  2. I also tried to use 127.0.0.1 instead of localhost as the hostname.
share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Uncheck "Allow local access only" in Server > MySQL.

share|improve this answer
add comment

OK. I just got it.

I had to change in the Connection properties of the connection I created, the following:

In the Advanced tab:

  1. Check the Use socket file option
  2. Set this path for the field above: /Applications/MAMP/tmp/mysql/mysql.sock

Note that the path to use is available in /Applications/MAMP/bin/startMysql.sh (given that I'm using MySQL).

share|improve this answer
add comment

Allowing local access resolved it for me.

share|improve this answer
2  
Can you add a bit more detail to improve this answer? –  Dave M Nov 28 '13 at 15:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.