# Rake db:migrate not working

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108>\
**Category:** Ruby\
**Created:** [January 31, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108 "2009-01-31T18:03:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [January 31, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/1 "2009-01-31T18:03:10Z")

</div>

I keep getting access denied for user ‘root’@‘localhost’ (using  
password: YES)

this is all I have in my database.yml file:  
development:  
adapter: mysql  
database: devel  
user: root  
password: xxxxxx  
host: localhost

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [January 31, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/2 "2009-01-31T18:21:10Z")

</div>

Chris G. wrote:

> I keep getting access denied for user ‘root’@‘localhost’ (using  
> password: YES)
> 
> this is all I have in my database.yml file:  
> development:  
> adapter: mysql  
> database: devel  
> user: root  
> password: xxxxxx  
> host: localhost

This is a Rails question (Ruby is a language) - further discussion  
belongs on  
Ruby on Rails Talk forum at Google G…

Run this at a command prompt:

mysql -uroot

If you get in (very likely for out-of-the-box MySQL), then take out the  
password  
line in that YAML file!

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [January 31, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/3 "2009-01-31T18:37:45Z")

</div>

Phlip wrote:

> This is a Rails question (Ruby is a language) - further discussion  
> belongs on  
> Ruby on Rails Talk forum at Google G…
> 
> Run this at a command prompt:
> 
> mysql -uroot
> 
> If you get in (very likely for out-of-the-box MySQL), then take out the  
> password  
> line in that YAML file!

Sorry new to ruby and rails…just learning it all. I tried that and I  
get the same error, but this time it says password: NO

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [January 31, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/4 "2009-01-31T19:00:37Z")

</div>

Chris G. wrote:

> > mysql -uroot
> > 
> > If you get in (very likely for out-of-the-box MySQL), then take out the  
> > password  
> > line in that YAML file!
> 
> Sorry new to ruby and rails…just learning it all. I tried that and I  
> get the same error, but this time it says password: NO

mysql -uroot -p

that means prompt for a password…

You could also reinstall mysql…

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [February 1, 2009, 12:27am UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/5 "2009-02-01T00:27:20Z")

</div>

> > > Sorry new to ruby and rails…just learning it all. I tried that and I  
> > > get the same error, but this time it says password: NO
> > 
> > mysql -uroot -p
> > 
> > that means prompt for a password…
> > 
> > You could also reinstall mysql…
> 
> i took out the password in the database.yml file and now it says that my  
> devel database is Unknown. I made sure the database is there, so I don’t  
> know what the problem is.

BUMP

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [January 31, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/6 "2009-01-31T19:56:34Z")

</div>

Phlip wrote:

> Chris G. wrote:
> 
> > > mysql -uroot
> > > 
> > > If you get in (very likely for out-of-the-box MySQL), then take out the  
> > > password  
> > > line in that YAML file!
> > 
> > Sorry new to ruby and rails…just learning it all. I tried that and I  
> > get the same error, but this time it says password: NO
> 
> mysql -uroot -p
> 
> that means prompt for a password…
> 
> You could also reinstall mysql…

i took out the password in the database.yml file and now it says that my  
devel database is Unknown. I made sure the database is there, so I don’t  
know what the problem is.

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [February 1, 2009, 1:50am UTC](https://www.ruby-forum.com/t/rake-db-migrate-not-working/159108/7 "2009-02-01T01:50:30Z")

</div>

Chris G. wrote:

> > i took out the password in the database.yml file and now it says that my  
> > devel database is Unknown. I made sure the database is there, so I don’t  
> > know what the problem is.
> 
> BUMP

No bump: Post a new, complete request to the Ruby on Rails Talk forum at  
Google  
Groups!

Make sure to tell them what ‘show databases;’ returns inside MySQL!
