Mysql2::Error: Can't create database

Hi all

database yml------

development:
adapter: mysql2
database: db_test
username: root
password:

i have installed mysql2 and 64bit mysql server.
when i run rake db:create it gives me this errror

does any one know whats happening here?

macbook:test_proj rathod$ rake db:create --trace
(in /Users/rathod/Desktop/test_proj)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
rake aborted!
Mysql2::Error: Can’t create database ‘db_database’ (errno: 2): CREATE
DATABASE db_database DEFAULT CHARACTER SET utf8 COLLATE
utf8_unicode_ci
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:207:in
rescue in log' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:199:inlog’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:314:in
execute' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:406:increate_database’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/railties/databases.rake:68:in
rescue in create_database' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/railties/databases.rake:39:increate_database’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.5/lib/active_record/railties/databases.rake:35:in
block (2 levels) in <top (required)>' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:incall’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in
block in execute' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:ineach’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:597:inblock in invoke_with_call_chain’
/Users/rathod/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in
mon_synchronize' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in
block (2 levels) in top_level' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:ineach’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in
block in top_level' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2001:inblock in run’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1998:inrun’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/bin/rake:31:in
<top (required)>' /Users/rathod/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:inload’
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `’

Do you really have no password on the root account for your MySQL
install?

On Fri, Mar 25, 2011 at 6:18 PM, Rajesh B. [email protected]
wrote:

i have installed mysql2 and 64bit mysql server.
when i run rake db:create it gives me this errror

does any one know whats happening here?

MySQL can’t create the database.

A quick google turns up this:

http://groups.google.com/group/sequel-pro/browse_thread/thread/4c1175ac05706d11/8b68c03585c33b1f?pli=1


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs