When trying to run rake db:create
or rake db:setup
I'm getting this error message:
Couldn't create database for {"adapter"=>"mysql2", "host"=>"localhost", "database"=>"mydb_dev"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
Couldn't create database for {"adapter"=>"mysql2", "host"=>"localhost", "database"=>"mydb_test"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
I have updated mysql2 and mysql --version
returns:
mysql Ver 14.14 Distrib 5.6.16, for osx10.9 (x86_64) using EditLine wrapper
Here's my database.yml:
development:
adapter: mysql2
host: localhost
database: mydb_dev
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
host: localhost
database: mydb_test
production:
adapter: mysql2
host: localhost
database: mydb_prod
Why can't the rake
command create the database?