Chris
4/5/2005 5:27:00 AM
Well, I lied a little bit. "Followed the directions to a 'tee'" wasn't
exactly correct. Since I didn't have MySQL installed on the Windows
box, I was attempting to port forward port 3306 back home to my MySQL
installation there. Turns out that in Rails, if you specify
"localhost" the MySQL Activator looks to see if one is running under
Unix and if so, it attempts to connect to /tmp/mysql.sock even if a
port is specified in database.yaml. Since I was attempting to run
under Cygwin, it looked like Unix to Rails, so... that's what it did
and there is no way to get it to look at the port number in
database.yaml.
When I installed Rails completely under Windows (and not under Cygwin),
the port forwarding worked.
I found the code in Rails that makes the MySQL connect and a simple
change would allow someone to run Rails with a MySQL Activator using a
port forwarded connection to a backend MySQL box. I submitted my patch
to the author of the MySQL Activator, so we'll see what happens.
-ceo