不知道为什么但是我无法连接mysql数据库。我使用的是rails v.4.2.4和mysql2 gem v.0.3.20。我已经阅读了使用mysql2 v.0.4的Rails 4.2的错误,所以我降级了gem,但仍然无法解决问题。有什么帮助吗? 在下面找到我从命令行获得的内容:
MacBook-Pro-di-Sandro:ssfbase sandropalmieri$ rake db:schema:dump
rake aborted!
Mysql2::Error: Access denied for user 'ssfbase'@'localhost' to database 'ssfbase_development'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/mysql2-0.3.20/lib/mysql2/client.rb:70:in `connect'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/mysql2-0.3.20/lib/mysql2/client.rb:70:in `initialize'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/connection_handling.rb:87:in `connection'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:240:in `block (4 levels) in <top (required)>'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:239:in `open'
/Users/sandropalmieri/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:239:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:schema:dump
(See full trace by running task with --trace)