Connecting to mysql 4.1.12 server

Hi,

I’m building a rails app on win32, and need to develop, test, and deploy
to a mysql 4.1.12 server running on a Linux server.

Whenever I attempt to connect to the database_development or
database_test directly from my workstation, I get the ‘Lost connection
to MySQL server during query’, however, I can connect directly from my
local mysql client on my workstation with no difficulty:

mysql --host=lx07 --port=3308 --user=redacted --password=redacted
database_development

Welcome to MySQL monitor…
… server version: 4.1.12-standard-log

mysql> show tables;
±-------------------------------+
| Tables_in_mcalogin_development |
±-------------------------------+
| activities |
| schema_info |
| users |
±-------------------------------+
3 rows in set (0.00 sec)

mysql> select * from users;
Empty set (0.00 sec)

The database.yml settings match what I expect them to be, no tabs, just
two spaces:

development:
adapter: mysql
database: database_development
username: redacted
password: redacted
host: lx07
port: 3308

test:
adapter: mysql
database: database_test
username: redacted
password: redacted
host: lx07
port: 3308

production:
adapter: mysql
database: database_production
username: redacted
password: redacted
host: lx07
port: 3308

Also, the database.yml has this admonition:

And be sure to use new-style password hashing:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Being on a 4.x server, the passwords seem to be in the old style. Is
this the issue? If so, what to do?

The development log doesn’t seem to log the credentials used, nor the
actual mysql error. So far, Google hasn’t come to my rescue. How do I
troubleshoot this?

Many Thanks.

Regards,
Rich D.

-----Original Message-----
From: [email protected] [mailto:rails-
[email protected]] On Behalf Of Duzenbury, Rich
Sent: Wednesday, July 26, 2006 5:02 PM
To: [email protected]
Subject: [Rails] Connecting to mysql 4.1.12 server

Hi,

I’m building a rails app on win32, and need to develop, test, and
deploy
to a mysql 4.1.12 server running on a Linux server.

Whenever I attempt to connect to the database_development or
database_test directly from my workstation, I get the ‘Lost connection
to MySQL server during query’, however, I can connect directly from my
local mysql client on my workstation with no difficulty:

The problem is that the 4.1.12 database had old privilege tables from a
previous release. I fixed the privilege tables via these instructions:

http://dev.mysql.com/doc/refman/4.1/en/mysql-fix-privilege-tables.html

Then, I had to restart the mysql server ‘select password(‘foo’)’ still
returned a short password.

Then, I changed the password used by the rails userid so it would
generate a long password in the mysql.user table.

Restarted WebBrick and everything works fine now.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs