5/16/2006

Cygwin Ruby on Rails MySQL problem

I've started playing around with Ruby on Rails on one of my Windows machines. I was trying to connect to my local MySQL installation and I kept getting the error:

No such file or directory - /tmp/mysql.sock

It turns out it's an issue with the Cygwin environment trying to use Unix sockets when you use "localhost". I read the excellent notes posted at
Labnotes » Blog Archive » Setting up Ruby + Gems on CygWin
. It turns out the fix is very simple. Just change localhost to its IP address, 127.0.0.1, and you're in business!

1 comment:

Anonymous said...

this was driving me crazy, thanks for the help!