So,

It seem that in some cases you can get this really funny error on JRuby when the pure Ruby MySQL driver says "Connection refused". Now, this can sometimes be resolved if you replace "host: localhost" with "host: 127.0.0.1" in your database configuration.

Why is this? Well, if you look in the lovely mysql-code:
*    if (host == nil or host == "localhost") and defined? UNIXSocket then

Now, the problem here is that we actually _have_ UNIXSocket defined. It just doesn't work. So the MySQL stuff will fail. Not really sure exactly why it doesn't ALWAYS fail, but replacing localhost to 127.0.0.1 will consistently fix it.

Cheers
*

--
Ola Bini (http://ola-bini.blogspot.com) JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)

"Yields falsehood when quined" yields falsehood when quined.



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to