>
>
> class MyClass < ActiveRecord::Base
> establish_connection(
> :adapter => 'mysql',
> :user => 'root',
> :database => 'hrsuite_production',
> :server => "127.0.0.1",
> :port => 3307)
>
> I've also tried :server => '127.0.0.1:3307' but that did not work
> either. I also tried :socket => nil, but no luck.
>
Try :host instead of :server .
--
Posted via http://www.ruby-forum.com/.
>
> I don't know how many times I looked at the API yesterday, but there
> it was. Thanks for catching it.
You're welcome :)
>
> By chance, do you know what the difference is between using host and
> server?
>
You mean, besides the fact that host works and server doesn't? ;-)
I'm guessing that, in the absence of a valid :host option, it tries to
connect to localhost.