Project

General

Profile

Error on Install - access denied when connecting to mysql

Added by Angela Mercer almost 9 years ago

I am using Redmine version 3.0.4-1 (installed using Bitnami). After running rake redmine:plugins:migrate I get the following error:
rake aborted!
Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)
/home/scantech/apps/redmine/redmine-3.0.4-1/apps/redmine/htdocs/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.14/lib/mysql2/client.rb:67:in `connect'
/home/scantech/apps/redmine/redmine-3.0.4-1/apps/redmine/htdocs/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.14/lib/mysql2/client.rb:67:in `initialize'
/home/scantech/apps/redmine/redmine-3.0.4-1/apps/redmine/htdocs/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
...

It appears the plugin is attempting to access the development database.

1) Not sure that the plugin should be accessing the development database, should it?
2) The username and password is correct in the database.yml file. Please help.

Thanks.


Replies (1)

RE: Error on Install - access denied when connecting to mysql - Added by Emilio González Montaña over 8 years ago

You should indicate to rake which environment to use, by default is development, the correct way (in your case) should be:

RAILS_ENV=production bundle exec rake redmine:plugins:migrate

Or if you don't use bundle (not probably), just:

RAILS_ENV=production rake redmine:plugins:migrate

    (1-1/1)