# Rake db:migrate error .. please help

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-error-please-help/189761>\
**Category:** Deployment\
**Created:** [June 7, 2010, 9:59am UTC](https://www.ruby-forum.com/t/rake-db-migrate-error-please-help/189761 "2010-06-07T09:59:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivhari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c37758/32.png) [@shivhari](https://www.ruby-forum.com/u/shivhari)\
**Post date:** [June 7, 2010, 9:59am UTC](https://www.ruby-forum.com/t/rake-db-migrate-error-please-help/189761/1 "2010-06-07T09:59:53Z")

</div>

I’m really new to ruby on rails and all of this.

I’m using mysql as a database server and i created a database with the  
name music\_library\_development, with a table in it.

Then i edit the database.yml file accordingly for mysql.  
adapter: mysql  
database: music\_library\_development  
username: root  
password: password  
host: localhost

after saving i go to the command prompt and inside the project folder  
and type rake db:migrate…

i get the following error:-

rake aborted!  
Mysql::Error: query: not connected: CREATE TABLE ‘schema\_migrations’  
(‘version’ varchar(255) NOT NULL) ENGINE=InnoDB

whats going wrong ??

---

<div class="post-metadata">

**Author:** ![shivhari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c37758/32.png) [@shivhari](https://www.ruby-forum.com/u/shivhari)\
**Post date:** [October 12, 2010, 3:20pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-error-please-help/189761/2 "2010-10-12T15:20:05Z")

</div>

you should first create the database before migrating it. use “rake  
db:create” first and then migrate it. it should work…

---

<div class="post-metadata">

**Author:** ![shivhari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c37758/32.png) [@shivhari](https://www.ruby-forum.com/u/shivhari)\
**Post date:** [October 15, 2010, 10:51am UTC](https://www.ruby-forum.com/t/rake-db-migrate-error-please-help/189761/3 "2010-10-15T10:51:28Z")

</div>

Andola S. wrote in post #949498:

> you should first create the database before migrating it. use “rake  
> db:create” first and then migrate it. it should work..

I was going to say that, but he mentions he did create it manually.

After a bit of googling, I found this post which seemed to have helped  
others with this problem:  
[http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407](http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407)

-sunny

> **[Ezror.com is for sale | HugeDomains](https://www.hugedomains.com/domain_profile.cfm?d=ezror.com)**
>
> Painless, quick delivery of your domain name. Fast and professional service.
