# Rake db:migrate fails

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-fails/174744>\
**Category:** Rails\
**Created:** [September 1, 2009, 3:34pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-fails/174744 "2009-09-01T15:34:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@jasonallen](https://www.ruby-forum.com/u/jasonallen)\
**Post date:** [September 1, 2009, 3:34pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-fails/174744/1 "2009-09-01T15:34:53Z")

</div>

i run the command:

rake db:migrate

but i get the error of:

Mysql::Error: query: not connected: SELECT version FROM  
schema\_migrations

i already checked my database.yml:

development:  
adapter: mysql  
database: my\_data  
username: root  
password: key123  
encoding: utf8  
host: localhost

and as far as i can see its complete. checked google and they said make  
sure that i can access the mysql. using the command line i was able to  
verify that i can access it. checked windows services to make sure that  
mysql is on it and i was able to confirm it too. so right now i dont  
know why when i perform the rake command it doesnt push through.

please do advise me on this issue. also some additional information

ruby 1.8.6  
rails 2.3.2  
gems 1.3.3  
MySQL 5.1.37  
Windows Vista

---

<div class="post-metadata">

**Author:** ![jasonallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@jasonallen](https://www.ruby-forum.com/u/jasonallen)\
**Post date:** [September 1, 2009, 3:56pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-fails/174744/2 "2009-09-01T15:56:18Z")

</div>

Have you created the databases you need?

On Tue, Sep 1, 2009 at 2:34 PM, Jason

---

<div class="post-metadata">

**Author:** ![jasonallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@jasonallen](https://www.ruby-forum.com/u/jasonallen)\
**Post date:** [September 1, 2009, 4:32pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-fails/174744/3 "2009-09-01T16:32:57Z")

</div>

yeah i have.

someone directed me to this site

> <https://stackoverflow.com/questions/1343500/ruby-on-rails-connection-problem>

and the solution made by jsidnell worked for me. thankfully

Kevin Jones wrote:

> Have you created the databases you need?
> 
> On Tue, Sep 1, 2009 at 2:34 PM, Jason
