I had installed Rails 3.0 on my Ruby 1.9.2 system and was trying out a new app. I had the mysql gem already installed into my system and hence since we know by default rails creates sqlite based database.yml. Hence forth while creating the file, I had to do the following changes

$rails new testmysqlapp -d mysql

This creates a mysql based app. however by default when you open the database.yml, you will see the adapter as mysql2 instead of mysql. I just changed from mysql2 to mysql

development:
adapter: mysql (changed from mysql)
encoding: utf8
database: testmysqlapp_development
pool: 5
username: root
password:
host: localhost

Also if you look at the GEMFILE you will see gem ‘mysql’ already available.

Now the first thing you do is run bundle installer

$cd testmysqlapp
$bundle install

This will install all the gems that you want to use.  Next step is to create the database. Lets use the standard rake method

$rake db:create (sometimes this will give errors especially i have found it in rails 3.0.1).

So alternatively i have used

$rake -r mysql db:create

Everything works fine and the database is created. this generally creates the Test and Development databases. Alternatively you can also mention the environment as

$rake -r mysql db:create ENV=development

Similarly when you want to do the migration you can call the similar code

$rake -r mysql db:migrate ENV=development

Hope this helps someother person… I have wasted whole day finding solution for this…