Forum: Ruby on Rails Mysql password hashes- 16 byte vs 41 byte

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Gary H. (Guest)
on 2006-01-19 01:05
(Received via mailing list)
I have a rails app that is (was) working with MySQL 5.0.   Until
yesterday that is when I started mucking with the MySQL GRANTs.

Right now I have grants for the following:

User	Host
root	%
root	localhost

The rails server is

In database.yml I have used socket: as well as host: and I am getting
login errors despite having what I think are valid grants that map to
localhost, the ip, and a socket login.  In fact I can log in using the
mysql command line client with no problem.

Now, when I was mucking with grants, I noticed one thing.   There was
one root grant that used the newer mysql 41 byte PASSWORD() hash.  All
the other grants use the older 16 byte hash.   I thought the grant with
the longer hash was redundant and stale so I removed it.

Would rails require a grant with the newer larger hash?  It seems to me
that one of the combinations of grants and hosts in database.yml should
have worked.

This topic is locked and can not be replied to.