I’ve run across an interesting (read frustrating) problem. I have
specific
application processes I don’t want to burn my hosts processing cycles on
so
I’m opting to do the processing on a computer local to me (through a RoR
installation) and push the data direct to the server. I’ve got
everything
setup on both ends, but every attempt to form a connection between my
local
box and production mysql host produces the following error:
Mysql::Error: Lost connection to MySQL server during query: SHOW FIELDS
FROM
menus
On a whim I set everything up on a Windows box to see if it was a system
problem or a host problem. Low and behold everything works like a charm
under windows. My current theory is that this has something to do with
the
drivers rails uses under OS X, but I can’t find anyone else’s
experiences
who has uncovered a viable solution.
Host: Bluehost (same results with dreamhost)
Operating Sys: OS X 10.4 and XP SP2 Home
Ruby/Rails: Latest Release for both
I appreciate the feedback, but I think I left out an important detail.
I do
have my rails app connecting to mysql locally. Setting this up has been
no
problem whatsoever. Only when I attempt to form a remote connection do
I
have any issues.
I appreciate the feedback, but I think I left out an important
detail. I do have my rails app connecting to mysql locally.
Setting this up has been no problem whatsoever. Only when I
attempt to form a remote connection do I have any issues.
Have you checked your firewall settings on Mac OS X? By default, the
Mac OS X firewall configuration will block remote MySQL socket
connections. Opening port 3306 on your firewall configuration should
allow remote connections.
I guess if that doesn’t do the trick, the next thing would by to use
e.g. the mysql command-line client to try to connect remotely first,
to rule out a connection issue (as opposed to a Rails issue).
Good luck,
Peter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.