i have installed mysql 5.5.11 and i'm running on Snow Leopard (10.6.7)

when i create my rails application everything wokrs fine:

rails fooTest -d mysql


cd fooTest


rake db:create

and i get:

Couldn't create database for {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"fooTest_development", "pool"=>5, "password"=>nil, "socket"=>"/tmp/mysql.sock"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation)

  • Post your database.yml (hide or obfusicate your password line, and maybe also your host line!). I suspect something else is at play here. Apr 13, 2011 at 20:31
  • Had to do some things with the MySQL root user password encryption UPDATE mysql.user SET Password=OLD_PASSWORD('NewPassword') WHERE User='root'; FLUSH PRIVILEGES;
    – Mr_Nizzle
    Apr 19, 2011 at 15:53

2 Answers 2


This looks like a permissions problem. Make sure you have a password set in your mysql and are able to login from the command line

mysql -u root -p

This should prompt you for your root password. If you can login there, that means you should be set. All you need to do then is put the password in your database.yml file and retry the rake command.


Try using the gem mysql2 in RoR. I had the same problem as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .