# Rake db:migrate not working

**URL:** https://rubytalk.org/t/rake-db-migrate-not-working/51463
**Category:** ruby-talk
**Created:** [31 January 2009 17:03 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463 "2009-01-31T17:03:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_Gunnels](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Chris\_Gunnels](https://rubytalk.org/u/Chris_Gunnels)
#### Post date: [31 January 2009 17:03 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/1 "2009-01-31T17:03:09Z")

</div>

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

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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

### Author: ![Phlip1](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Phlip1](https://rubytalk.org/u/Phlip1)
#### Post date: [31 January 2009 17:20 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/2 "2009-01-31T17:20:03Z")

</div>

Chris Gunnels wrote:

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

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

Run this at a command prompt:

&nbsp;&nbsp;&nbsp;mysql -uroot

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

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;Phlip  
> &nbsp;&nbsp;&nbsp;["Pigleg too?", week 1](http://flea.sourceforge.net/PiglegToo_1.html)

---

<div class="post-metadata">

### Author: ![Chris\_Gunnels](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Chris\_Gunnels](https://rubytalk.org/u/Chris_Gunnels)
#### Post date: [31 January 2009 17:37 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/3 "2009-01-31T17: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 Groups.
> 
> Run this at a command prompt:
> 
> &nbsp;&nbsp;&nbsp;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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

### Author: ![Phlip1](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Phlip1](https://rubytalk.org/u/Phlip1)
#### Post date: [31 January 2009 18:00 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/4 "2009-01-31T18:00:02Z")

</div>

Chris Gunnels wrote:

> > &nbsp;&nbsp;&nbsp;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: ![Chris\_Gunnels](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Chris\_Gunnels](https://rubytalk.org/u/Chris_Gunnels)
#### Post date: [31 January 2009 18:56 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/5 "2009-01-31T18:56:32Z")

</div>

Phlip wrote:

> Chris Gunnels wrote:
> 
> > > &nbsp;&nbsp;&nbsp;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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

### Author: ![Chris\_Gunnels](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Chris\_Gunnels](https://rubytalk.org/u/Chris_Gunnels)
#### Post date: [31 January 2009 23:27 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/6 "2009-01-31T23:27:17Z")

</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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

### Author: ![Phlip1](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Phlip1](https://rubytalk.org/u/Phlip1)
#### Post date: [1 February 2009 00:50 UTC](https://rubytalk.org/t/rake-db-migrate-not-working/51463/7 "2009-02-01T00:50:00Z")

</div>

Chris Gunnels 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!
