Nevermind, I''ve solved this by trawling the internet.
So for future reference, if you specify the host as an IP address then
the mysql client will flip to use TCP/IP, so simply change the host
arguments value in the database.yml file to an IP (127.0.0.1 for
localhost and tunnelling).
-Simon
On Aug 30, 11:09 am, saha860
<saholr...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:> Hello,
>
> I want to tunnel a mysql connection to a database behind a firewall. I
> can connect to the database from a terminal using a tunnel to the host
> machine if I specify --protocol like this:
>
> mysql -u xxxx -h localhost -P 3322 -p --protocol tcp
>
> I originally thought that specifying a port number would switch mysql
> into tcp mode instead of looking for a socket, but that doesn''t
seem
> to be the case.
>
> So the problem is, how can I tell rails to use the --protocol argument
> when connecting to my database? The documentation for
> ActiveRecord::ConnectionAdapters::MysqlAdapter doesn''t offer a
> protocol option.
>
> Any ideas people?
>
> Thanks.
>
> -Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---