MySQL said: Can’t connect to MySQL server on ‘127.0.0.1’ (61) Sequel Pro

Screenshot 2014-03-28 22.29.56
I was getting this error when connecting to MySQL Database after I changed password for `root` user. The error was

MySQL said: Can't connect to MySQL server on '127.0.0.1' (61)

This took my quite some time to resolve. The problem in my case started when I changed the root password. Sequel Pro gave me error first so I thought it is easy, just use the new password. But that did not work. Note that only Sequel Pro was broke, My PHPMYADMIN was working fine without any trouble. What really worked for me to fix Sequel Pro connectivity, I changed two things

* Change 127.0.0.1 to localhost in connection string
* Used the old password (not the new one that I  just changed)

Trouble Shoot Connection from Command Prompt

Other things you can do is, try to connect to MYSQL from command prompt in Terminal (I am on mac OS X Mavericks).

/Applications/xampp/xamppfiles/bin/mysql -u root -p 
# this will prompt for password

Once this connects using the correct password, you already know what is the password. Then change 127.0.0.1 to localhost (all lower case). That should probably solve it.

The following screenshot setting should connect.

Sequel Pro Connection Setting

Note that the following setting used to work but after I changed the password, it no longer works.

Sequel Pro connection String IP

When you provide localhost, it will popup this dialog. Just select “Connect Via Socket”.

connection failed sequel pro

connection failed sequel pro

I was getting these errors while I was working on it

Password provided on command prompt was wrong.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

and

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to MySQL said: Can’t connect to MySQL server on ‘127.0.0.1’ (61) Sequel Pro

  1. Katrine says:

    Hello,
    I have just swift to Mavericks,and now I can’t connect?
    The big problem is,that I have all my customers in there,and I can’t work without,so please help soon as possible?I have tried to do,what you have already written,but can’t get it to work?
    Best Regards
    Katrine

    • admin says:

      I have updated the post. Try to troubleshoot connection from command prompt, once that works, it will make life easier.

  2. sangprabo says:

    I am using sequel pro and after commenting the line ‘skip-networking’ on macports-default.cnf it seems to be working again.

  3. Vijay says:

    Thanks man. This particular issue wasted a lot of my time. Your solution worked perfectly for me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s