How can I tell Rails *not* to load the mysql411 adapter? I''ve just upgraded to 0.14.2 from 0.13, connecting to a MySQL 4.0.17 server, and I''m suddenly getting "Access denied for user: ''rails@localhost'' (Using password: YES)" on all actions. None of the access details have changed, so I can only assume that the password hashing for MySQL 4.1 is getting in the way. Any pointers? -- Alex
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 30, 2005, at 8:06 AM, Alex Young wrote:> How can I tell Rails *not* to load the mysql411 adapter? I''ve just > upgraded to 0.14.2 from 0.13, connecting to a MySQL 4.0.17 server, > and I''m suddenly getting "Access denied for user: > ''rails@localhost'' (Using password: YES)" on all actions. None of > the access details have changed, so I can only assume that the > password hashing for MySQL 4.1 is getting in the way. > > Any pointers?Either update your passwords to new-style hashing or ''gem install mysql'' to use the much faster C bindings instead. Best, jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDZQAxAQHALep9HFYRAtCEAJ9gdNc6yw5517Y6Nx2eEzXSCKmy7wCfXDaG LTDyE7qGOEgEy1x+cFtbZp0=LvZN -----END PGP SIGNATURE-----
Jeremy Kemper wrote:> Either update your passwords to new-style hashingCan''t. I''ve got to be compatible with a commercial DB host, and they aren''t about to give me that kind of access.> or ''gem install > mysql'' to use the much faster C bindings instead.Can''t. Haven''t got the space for the dev toolkit, so I can''t compile a native extension, but that''s tangential. As it stands, AR is broken. It makes the wrong assumption about the version of MySQL I''ve got installed, with no apparent way to override it. Would a patch to allow a version specification in database.yml be likely to be accepted? There are a couple of other problems with supporting 4.0 that could be addressed at the same time, like the fact that the ENGINE table type keyword isn''t valid. -- Alex
I am using mysql 4.0.23, and i dont have any problemes. I have upgrad tu 0.14.2 and no problem with 4.0. but with 4.1 and 5.0 i cant support new autentication sheme off mysql. Alex Young wrote:> How can I tell Rails *not* to load the mysql411 adapter? I''ve just > upgraded to 0.14.2 from 0.13, connecting to a MySQL 4.0.17 server, and > I''m suddenly getting "Access denied for user: ''rails@localhost'' (Using > password: YES)" on all actions. None of the access details have > changed, so I can only assume that the password hashing for MySQL 4.1 > is getting in the way. > > Any pointers? >"Ce message et toutes les pièces jointes sont des informations strictement confidentielles et réservées au(x) destinataire(s). Ce courriel n''a pas de valeur contractuelle et son contenu ne constitue ni une acceptation, ni un engagement de la part de l''auteur et des sociétés du groupe Serveur et Artprice, sauf dans le cas où cela aurait été prévu avec le destinataire par un accord écrit. Le contenu de ce message et les pièces jointes ne peuvent constituer une preuve au sens de l''article 1316-1 du Code Civil. L.auteur et les sociétés du groupe Serveur et Artprice déclinent toute responsabilité au titre de ce courriel s''il a été altéré, déformé, falsifié ou indûment utilisé par des tiers ou encore s''il a causé tout dommage ou perte de toute nature. Si vous n''êtes pas le bon destinataire, merci de nous contacter et de ne pas le divulguer." "This message including any attachments are confidential and privileged material intended solely for the addressees. Its contents do not constitute a commitment by groupe Serveur sas and Artprice SA, except when provided for in a written agreement with the addressees. The contents of this message cannot constitute neither the proof nor the acceptance of any agreement as per article 1316-1 of the French civil code. Groupe Serveur sas and Artprice SA shall not be rendered liable in any manner whatsoever for the delay and/or loss in transit of this message, for corruption, alteration, falsification, misuse or fraudulent use (which may be made) of this message. If you receive this message in error, please delete it and immediately notify the sender. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized use, copying or dissemination is prohibited."
Christophe Vigny wrote:> I am using mysql 4.0.23, and i dont have any problemes. I have upgrad tu > 0.14.2 and no problem with 4.0. > but with 4.1 and 5.0 i cant support new autentication sheme off mysql.Really? That surprises me. Is that with the mysql gem, or mysql-ruby? Further googling has revealed some potentially helpful bits and pieces (or at least some others with the same issue as me) at http://wiki.rubyonrails.com/rails/pages/MySQL+Database+access+problem, so I''m going to take a look later. -- Alex> > > Alex Young wrote: > >> How can I tell Rails *not* to load the mysql411 adapter? I''ve just >> upgraded to 0.14.2 from 0.13, connecting to a MySQL 4.0.17 server, and >> I''m suddenly getting "Access denied for user: ''rails@localhost'' (Using >> password: YES)" on all actions. None of the access details have >> changed, so I can only assume that the password hashing for MySQL 4.1 >> is getting in the way. >> >> Any pointers? >> > > "Ce message et toutes les pièces jointes sont des informations > strictement confidentielles et réservées au(x) destinataire(s). Ce > courriel n''a pas de valeur contractuelle et son contenu ne constitue ni > une acceptation, ni un engagement de la part de l''auteur et des sociétés > du groupe Serveur et Artprice, sauf dans le cas où cela aurait été prévu > avec le destinataire par un accord écrit. Le contenu de ce message et > les pièces jointes ne peuvent constituer une preuve au sens de l''article > 1316-1 du Code Civil. L.auteur et les sociétés du groupe Serveur et > Artprice déclinent toute responsabilité au titre de ce courriel s''il a > été altéré, déformé, falsifié ou indûment utilisé par des tiers ou > encore s''il a causé tout dommage ou perte de toute nature. Si vous > n''êtes pas le bon destinataire, merci de nous contacter et de ne pas le > divulguer." > > "This message including any attachments are confidential and privileged > material intended solely for the addressees. Its contents do not > constitute a commitment by groupe Serveur sas and Artprice SA, except > when provided for in a written agreement with the addressees. The > contents of this message cannot constitute neither the proof nor the > acceptance of any agreement as per article 1316-1 of the French civil code. > Groupe Serveur sas and Artprice SA shall not be rendered liable in any > manner whatsoever for the delay and/or loss in transit of this message, > for corruption, alteration, falsification, misuse or fraudulent use > (which may be made) of this message. If you receive this message in > error, please delete it and immediately notify the sender. If the reader > of this message is not the intended recipient, you are hereby notified > that any unauthorized use, copying or dissemination is prohibited." > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Can you run this on the host? SET PASSWORD FOR ''some_user''@''some_host'' = OLD_PASSWORD(''mypass''); HTH- -Ezra On Oct 31, 2005, at 1:56 AM, Alex Young wrote:> Jeremy Kemper wrote: > >> Either update your passwords to new-style hashing >> > Can''t. I''ve got to be compatible with a commercial DB host, and they > aren''t about to give me that kind of access. > > >> or ''gem install >> mysql'' to use the much faster C bindings instead. >> > Can''t. Haven''t got the space for the dev toolkit, so I can''t > compile a > native extension, but that''s tangential. As it stands, AR is broken. > It makes the wrong assumption about the version of MySQL I''ve got > installed, with no apparent way to override it. Would a patch to > allow > a version specification in database.yml be likely to be accepted? > There > are a couple of other problems with supporting 4.0 that could be > addressed at the same time, like the fact that the ENGINE table type > keyword isn''t valid. > > -- > > Alex > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
No, because OLD_PASSWORD() was introduced in 4.1. That''s addressing the wrong problem. -- Alex Ezra Zygmuntowicz wrote:> Can you run this on the host? > > SET PASSWORD FOR ''some_user''@''some_host'' = OLD_PASSWORD(''mypass''); > > > HTH- > -Ezra > > On Oct 31, 2005, at 1:56 AM, Alex Young wrote: > >> Jeremy Kemper wrote: >> >>> Either update your passwords to new-style hashing >>> >> Can''t. I''ve got to be compatible with a commercial DB host, and they >> aren''t about to give me that kind of access. >> >> >>> or ''gem install >>> mysql'' to use the much faster C bindings instead. >>> >> Can''t. Haven''t got the space for the dev toolkit, so I can''t compile a >> native extension, but that''s tangential. As it stands, AR is broken. >> It makes the wrong assumption about the version of MySQL I''ve got >> installed, with no apparent way to override it. Would a patch to allow >> a version specification in database.yml be likely to be accepted? There >> are a couple of other problems with supporting 4.0 that could be >> addressed at the same time, like the fact that the ENGINE table type >> keyword isn''t valid. >> >> -- >> >> Alex >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > 509-577-7732 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Alex Young wrote:> No, because OLD_PASSWORD() was introduced in 4.1. That''s addressing the > wrong problem. >That''ll teach me to spout off before checking. Apparently OLD_PASSWORD() does work on 4.0.17. It just gives exactly the same as PASSWORD(), like you''d expect. Which gets me nowhere. -- Alex
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 31, 2005, at 1:56 AM, Alex Young wrote:> Jeremy Kemper wrote: >> Either update your passwords to new-style hashing > Can''t. I''ve got to be compatible with a commercial DB host, and they > aren''t about to give me that kind of access.Have you asked? It''s a simple change for them that can be done per- user.>> or ''gem install >> mysql'' to use the much faster C bindings instead. > Can''t. Haven''t got the space for the dev toolkit, so I can''t > compile a > native extension, but that''s tangential.Huh? It''s not at all tangential. You can just as well copy the .so over. Does your web host provide RubyGems, or do you put rails in your vendor/rails directory? If the former, first do ''rake freeze_gems'' to pull the gems into vendor/rails. Then edit vendor/rails/ activerecord/lib/active_record/connection_adapters/mysql_adapter and comment out line 17, "require ''active_record/vendor/mysql411''"> As it stands, AR is broken. > It makes the wrong assumption about the version of MySQL I''ve got > installed, with no apparent way to override it. Would a patch to > allow > a version specification in database.yml be likely to be accepted? > There > are a couple of other problems with supporting 4.0 that could be > addressed at the same time, like the fact that the ENGINE table type > keyword isn''t valid.A patch to detect the MySQL server version and behave appropriately is very welcome. I know many Japanese use the 4.0 series due to encoding issues introduced in 4.1, so we''d like to be a good citizen. And, as a personal note, it sounds like you have a poor host. Unless you are locked into a contract (?) I''d find someone more flexible. Competition is fierce for your business. jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDZlLpAQHALep9HFYRAq7KAJ0S6s7lvWUspZ72dpdSK7qyA6L6zwCg0/Kb mufauUs3yu4lazNuSl8AEyA=uwtZ -----END PGP SIGNATURE-----
Jeremy Kemper wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Oct 31, 2005, at 1:56 AM, Alex Young wrote: > >> Jeremy Kemper wrote: >> >>> Either update your passwords to new-style hashing >> >> Can''t. I''ve got to be compatible with a commercial DB host, and they >> aren''t about to give me that kind of access. > > Have you asked? It''s a simple change for them that can be done per- user.The reason it can''t change isn''t just lack of access. It''s got to stay compatible with a PHP 4 application which is the main interface to the database, which I have no control over. I *could* ask for a second user account on the database, though...>> Can''t. Haven''t got the space for the dev toolkit, so I can''t compile a >> native extension, but that''s tangential. > > Huh? It''s not at all tangential. You can just as well copy the .so over.Between x86 Linux and OS X 10.3? I''d be astonished :-) My meaning behind ''tangential'' was that it doesn''t address what seems to be the root cause of the problem.> Does your web host provide RubyGems, or do you put rails in your > vendor/rails directory? If the former, first do ''rake freeze_gems'' to > pull the gems into vendor/rails. Then edit vendor/rails/ > activerecord/lib/active_record/connection_adapters/mysql_adapter and > comment out line 17, "require ''active_record/vendor/mysql411''"After my earlier email, I chucked edge rails into the vendor directory, but making that edit didn''t seem to make any difference. What might have load precedence over the vendor directory? There''s a very good chance there''s something screwy with my entire dev setup, or that I''m just being unbelievably foolish...> A patch to detect the MySQL server version and behave appropriately is > very welcome. I know many Japanese use the 4.0 series due to encoding > issues introduced in 4.1, so we''d like to be a good citizen.I''ll take a look at it tonight.> And, as a personal note, it sounds like you have a poor host.Very. Not my choice, and heavily politically entrenched. In my eyes, we''d be better of self-hosting for what we''re doing, but I''ve tried that tack and got nowhere. -- Alex
Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> writes:> How can I tell Rails *not* to load the mysql411 adapter?I''ve commented it out in my source tree, but that might not be an option for you. =\ This MySql issue is !#$!@#$ frustrating, to be sure. -- I tend to view "truly flexible" by another term: "Make everything equally hard". -- DHH
Michael Campbell wrote:> Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> writes: > > >>How can I tell Rails *not* to load the mysql411 adapter? > > > I''ve commented it out in my source tree, but that might not be an option for you. =\ > > This MySql issue is !#$!@#$ frustrating, to be sure. >It''s got me working again, but it''s not a real solution. I unfortunately haven''t had the time to look into switching the MySQL version at connection time, but I don''t think it''d be too tricky - the Mysql (4.0) class picks up the server version in the real_connect method on instantiation, so there''s a natural way in there... -- Alex