I''m trying out the ONLamp tutorial (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) and I''m getting an error with mysql. The URL I am going to is: http://127.0.0.1:3000/recipe/new/ The error is: Mysql::Error in Recipe#new Access denied for user: ''root@localhost'' (Using password: NO) script/server:48 I have tried entering my password in the database.yml file and I get the same error. Can anyone point me in the right direction? I am running Rails on OS X, with MySQL 4.0.15. Thanks, Karim
On 4/25/05, K. A. <ka1968-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying out the ONLamp tutorial > (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) and I''m > getting an error with mysql. The URL I am going to is: > > http://127.0.0.1:3000/recipe/new/ > > The error is: > > Mysql::Error in Recipe#new > > Access denied for user: ''root@localhost'' (Using password: NO) > script/server:48 > > I have tried entering my password in the database.yml file and I get > the same error. Can anyone point me in the right direction?Have you entered the password for the correct database? i.e. development? I''d expect to see Using password: YES in that case.> I am running Rails on OS X, with MySQL 4.0.15. > > Thanks, > Karim > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
Yes, I tried it with a password as well and checked that the username and password was correct, restarted the server and got Using Password:Yes, but still access denied. Any other suggestions? On 4/24/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 4/25/05, K. A. <ka1968-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m trying out the ONLamp tutorial > > (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) and I''m > > getting an error with mysql. The URL I am going to is: > > > > http://127.0.0.1:3000/recipe/new/ > > > > The error is: > > > > Mysql::Error in Recipe#new > > > > Access denied for user: ''root@localhost'' (Using password: NO) > > script/server:48 > > > > I have tried entering my password in the database.yml file and I get > > the same error. Can anyone point me in the right direction? > > Have you entered the password for the correct database? i.e. > development? I''d expect to see Using password: YES in that case. > > > I am running Rails on OS X, with MySQL 4.0.15. > > > > Thanks, > > Karim > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > Cheers > > Koz >
K. A. wrote:> Yes, I tried it with a password as well and checked that the username > and password was correct, restarted the server and got Using > Password:Yes, but still access denied. > > Any other suggestions?I believe Rails has been updated to use the *new* MySQL password hashing scheme that appeared in MySQL 4.1 -- see: http://dev.mysql.com/doc/mysql/en/password-hashing.html I''d try upgrading you MySQL installation to 4.1 or higher. Curt> On 4/24/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>On 4/25/05, K. A. <ka1968-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>>I''m trying out the ONLamp tutorial >>>(http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) and I''m >>>getting an error with mysql. The URL I am going to is: >>> >>>http://127.0.0.1:3000/recipe/new/ >>> >>>The error is: >>> >>>Mysql::Error in Recipe#new >>> >>>Access denied for user: ''root@localhost'' (Using password: NO) >>>script/server:48 >>> >>>I have tried entering my password in the database.yml file and I get >>>the same error. Can anyone point me in the right direction? >> >>Have you entered the password for the correct database? i.e. >>development? I''d expect to see Using password: YES in that case. >> >> >>>I am running Rails on OS X, with MySQL 4.0.15. >>> >>>Thanks, >>>Karim >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >>-- >>Cheers >> >>Koz >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
OK, I am making some progress. I upgraded to mysql 4.1.11 and now I don''t get the access denied error. Instead I get this error: NoMethodError in Recipe#new undefined method `each'' for nil:NilClass script/server:48 Any advice? Karim On 4/24/05, Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote:> K. A. wrote: > > Yes, I tried it with a password as well and checked that the username > > and password was correct, restarted the server and got Using > > Password:Yes, but still access denied. > > > > Any other suggestions? > > I believe Rails has been updated to use the *new* MySQL password hashing > scheme that appeared in MySQL 4.1 -- see: > > http://dev.mysql.com/doc/mysql/en/password-hashing.html > > I''d try upgrading you MySQL installation to 4.1 or higher. > > Curt > > > On 4/24/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >>On 4/25/05, K. A. <ka1968-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >>>I''m trying out the ONLamp tutorial > >>>(http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html) and I''m > >>>getting an error with mysql. The URL I am going to is: > >>> > >>>http://127.0.0.1:3000/recipe/new/ > >>> > >>>The error is: > >>> > >>>Mysql::Error in Recipe#new > >>> > >>>Access denied for user: ''root@localhost'' (Using password: NO) > >>>script/server:48 > >>> > >>>I have tried entering my password in the database.yml file and I get > >>>the same error. Can anyone point me in the right direction? > >> > >>Have you entered the password for the correct database? i.e. > >>development? I''d expect to see Using password: YES in that case. > >> > >> > >>>I am running Rails on OS X, with MySQL 4.0.15. > >>> > >>>Thanks, > >>>Karim > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >> > >>-- > >>Cheers > >> > >>Koz > >> > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >
K. A. wrote:> OK, I am making some progress. I upgraded to mysql 4.1.11 and now I > don''t get the access denied error. Instead I get this error: > > NoMethodError in Recipe#new > > undefined method `each'' for nil:NilClass > script/server:48 > > Any advice? > > KarimI need more details. Where are you in the tutorial? Curt