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
Any ideas people?