# Problem with my database.yml - access denied

**URL:** <https://www.ruby-forum.com/t/problem-with-my-database-yml-access-denied/112037>\
**Category:** Rails\
**Created:** [August 14, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/problem-with-my-database-yml-access-denied/112037 "2007-08-14T15:35:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellygreer1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/77aa72/32.png) [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Post date:** [August 14, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/problem-with-my-database-yml-access-denied/112037/1 "2007-08-14T15:35:12Z")

</div>

Trying to get Rails up and running on my webhost and I keep getting an  
error when I try to generate the scaffolding.

here is there error:  
Access denied for user ‘kgreer’@‘localhost’ to database  
‘kgreer\_DbMain’

Can I put my password “in the clear” in the database.yml? or am I  
supposed to do some kind of hash of the password? I am using mySQL 5  
as the database.

Also my password ends in an exclamation character. This doesn’t need  
to be escaped in YAML does it?

Thanks,  
Kelly Greer  
removed\_email\_address@domain.invalid  
replace nospam with yahoo

---

<div class="post-metadata">

**Author:** ![kellygreer1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/77aa72/32.png) [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Post date:** [August 15, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/problem-with-my-database-yml-access-denied/112037/2 "2007-08-15T15:03:28Z")

</div>

Hi Kelly,

kellygreer1 wrote:

> Trying to get Rails up and running on my webhost  
> and I keep getting an error when I try to generate  
> the scaffolding.
> 
> here is there error:  
> Access denied for user ‘kgreer’@‘localhost’ to database  
> ‘kgreer\_DbMain’
> 
> Can I put my password “in the clear” in the database.yml?

Yes. The entry in database.yml is clear text.

> Also my password ends in an exclamation character. This  
> doesn’t need to be escaped in YAML does it?

Never heard of a problem, but don’t know about the exclamation character  
for  
sure.

Best regards  
Bill
