# I need some help

**URL:** <https://www.ruby-forum.com/t/i-need-some-help/171438>\
**Category:** Rails\
**Created:** [July 2, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/i-need-some-help/171438 "2009-07-02T14:11:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [July 2, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/i-need-some-help/171438/1 "2009-07-02T14:11:33Z")

</div>

hi, i am new to the ruby on rails.

i am trying to create one web application using ror, i created directory  
structure and started webrick server, after the when go for  
[http://127.0.0.1:3000/](http://127.0.0.1:3000/), it gives the home page, after that i created one  
controller and rhtml file regarding that controller.  
but when i want to access that from the browser it gives the error like  
this “Access denied for user ‘root’@‘localhost’ (using password: NO)”.  
can any bady just help me to rectify this problam. i am using rails  
2.0.2 and mysql 5.0 versions.

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [July 2, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/i-need-some-help/171438/2 "2009-07-02T14:15:30Z")

</div>

Hi,

That sounds like you haven’t set up your database.yml file correctly.

Simon

On Thu, 02 Jul 2009 20:11:33 +0800, Rajendra B.

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [July 2, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/i-need-some-help/171438/3 "2009-07-02T14:23:41Z")

</div>

On Thu, Jul 2, 2009 at 8:11 AM, Rajendra  
Bayana[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “Access denied for user ‘root’@‘localhost’ (using password: NO)”.

This is coming from MySql. You need to set up config/database.yml to  
match your mysql setup.

You can run mysql with no password for the root user, which is not  
advisable, but is often done in a DEVELOPMENT environment. It looks  
like your mysql setup requires a root user password.

You can remove the password, if the machine is totally under your  
control, I can’t recall the details but a little googling should find  
them for you.

The other alternative is to put the root mysql password in the  
config/database.yml file.

The more normal setup is to create a mysql user for the Rails app, and  
give it access to only the databases and tables it needs. You really  
want to do something like this for the deployed production action.

–  
Rick DeNatale

Blog: [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)  
Twitter: [http://twitter.com/RickDeNatale](http://twitter.com/RickDeNatale)  
WWR: [http://www.workingwithrails.com/person/9021-rick-denatale](http://www.workingwithrails.com/person/9021-rick-denatale)  
LinkedIn: [http://www.linkedin.com/in/rickdenatale](http://www.linkedin.com/in/rickdenatale)
