# ONLamp.com Tutorial Trouble

**URL:** <https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601>\
**Category:** Rails\
**Created:** [March 9, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601 "2006-03-09T18:26:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Abate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Alex\_Abate](https://www.ruby-forum.com/u/Alex_Abate)\
**Post date:** [March 9, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601/1 "2006-03-09T18:26:01Z")

</div>

I have installed Ruby on Rails and the latest version of MySQL in my  
Windows XP machine and I am following a demo from [ONLamp.com](http://ONLamp.com)  
[http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3](http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3). I am  
3/5 down the page where it says:

“Open a browser and navigate to [http://127.0.0.1:3000/recipe/new](http://127.0.0.1:3000/recipe/new). You  
should see something like Figure 32.”

Instead of a page like Figure 32, I get an error that looks something  
like this:

"Mysql::Error in Recipe#new

#28000Access denied for user ‘root’@‘localhost’ (using password: NO)

RAILS\_ROOT: ./script/…/config/…"

A friend told me that the latest version of MySQL handles passwords in a  
way that is incompatible with the current RoR release. He suggested that  
I configure MySQL to use the old password format. Using the MySQL system  
tray monitor I configured the instance and set MySQL to use the old  
password format. Since that didn’t seem to do the trick, I restarted the  
PC. That didn’t do it either, I still get the same error. I checked the  
configuration for the instance and the use old passwords setting in the  
Security tab is still checked.

I looked at my.ini and at the bottom it reads:

“#Use old password encryption method (needed for 4.0 and older clients).  
old-passwords”

I am guessing that means MySQL is using the old password format when it  
launches the service. Am I right or do I have to force it to read those  
settings somehow?

I am beginning to think that my problem is not the old password format  
but something else. I have followed the tutorial closely and I don’t  
think I have made any mistakes, at least that I didn’t already correct.  
What could be causing this error? How do I specify the password so I  
can get past this error? What am I missing?

Thanks!

---

<div class="post-metadata">

**Author:** ![Alex\_Abate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Alex\_Abate](https://www.ruby-forum.com/u/Alex_Abate)\
**Post date:** [March 9, 2006, 6:53pm UTC](https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601/2 "2006-03-09T18:53:51Z")

</div>

I figured out a way around the problem. I removed the password from the  
root account and now the page displays as expected. I still would like  
to know how to get the password to go through properly without  
generating an error.

---

<div class="post-metadata">

**Author:** ![Alex\_Abate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Alex\_Abate](https://www.ruby-forum.com/u/Alex_Abate)\
**Post date:** [March 9, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601/3 "2006-03-09T19:15:30Z")

</div>

Hi Alex,

What password do you have specified for ‘root’ for this database in your  
database.yml file?

Bill  
----- Original Message -----  
From: “Alex Abate” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: 2006-03-09 11:26 AM  
Subject: [Rails] [ONLamp.com](http://ONLamp.com) Tutorial Trouble

---

<div class="post-metadata">

**Author:** ![Alex\_Abate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@Alex\_Abate](https://www.ruby-forum.com/u/Alex_Abate)\
**Post date:** [March 9, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/onlamp-com-tutorial-trouble/54601/4 "2006-03-09T22:01:58Z")

</div>

Having just started playing with RoR, I had no idea about this setting.  
I had no password in the database.yml file. I didn’t even know to look.  
A friend told me about this file and I put the password there. Now I  
have a password for root and I don’t get an error.

Thanks,

Bill W. wrote:

> Hi Alex,
> 
> What password do you have specified for ‘root’ for this database in your  
> database.yml file?
> 
> Bill  
> ----- Original Message -----  
> From: “Alex Abate” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> Sent: 2006-03-09 11:26 AM  
> Subject: [Rails] [ONLamp.com](http://ONLamp.com) Tutorial Trouble
