denniss$ rake db:create
(in /Users/denniss/Documents/RoR/blog)
Couldn't create database for {"adapter"=>"mysql", "database"=>"blog",
"encoding"=>"utf8", "pool"=>5, "username"=>"root",
"password"=>"denniss",
"socket"=>"/Applications/rubystack/mysql/tmp/mysql.sock"}, charset:
utf8, collation: utf8_unicode_ci (if you set the charset manually, make
sure you have a matching collation)
note that I installed rubystack but I always use the ruby inside
denniss$ which ruby
/usr/local/bin/ruby
denniss$ which mysql
/Applications/rubystack/mysql/bin/mysql
had the same problem a fews days ago. Unfortunately the error message
is a little bit misleading, because in that case it didn't had to do
anything with setting the charset manually. Anyway...
I'm assuming your working on a mac:
1. Make sure you refer the correct 'mysql.sock' file within your
database.yml. For a mac os x setup it usually should be '/tmp/
mysql.sock' not '/tmp/mysqld.sock' for example.
2. If that wasn't the problem, make sure to install the correct mysql
version with the right mysql gem accordingly. A good explanation for
doing this is given by Ian Selby at