Hello,
I'm trying to connect to a remote mysql server using a ssh tunnel and activerecord.
I know the ssh tunnel is working because I can connect via the cmd line client. I've set the ssh tunnel up like this: ssh -L 3307:127.0.0.1:3306.
So, I thought I could just change the port on my active record connection, but it still connects to my local mysql server.
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.
I'm running active record 2.3.4
Any suggestions and thanks for taking a look,
Matt