R
Rajesh B.
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:in
`log'
/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:in
`create_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:in
`create_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:in
`call'
/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:in
`each'
/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:in
`block 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:in
`invoke_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:in
`invoke_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:in
`each'
/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:in
`standard_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:in
`block 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:in
`run'
/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:in `load'
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
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:in
`log'
/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:in
`create_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:in
`create_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:in
`call'
/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:in
`each'
/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:in
`block 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:in
`invoke_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:in
`invoke_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:in
`each'
/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:in
`standard_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:in
`block 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:in
`run'
/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:in `load'
/Users/rathod/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'