RAILS_ENV=production rake db:migrate - Access denied for user
Added by daniel doe over 14 years ago
Hi there,
Im trying to install Redmine on my ubuntu 8.04 server using the guide http://www.redmine.org/wiki/redmine/RedmineInstall
But I keep getting a mysql error. I tried to edit the database.yml and use root but with no luck.
When I try to access mysql using the terminal I dont have a problem
root@lvps83-169-40-171:/www/redmine-0.9.4# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.0.51a-3ubuntu5.7 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;------------------
| Database |------------------
| information_schema |
| mysql |
| redmine |------------------
3 rows in set (0.00 sec)
root@lvps83-169-40-171:/www/redmine-0.9.4# RAILS_ENV=production script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `real_connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql::Error)
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `connect'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
from /www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
... 78 levels...
from /www/redmine-0.9.4/vendor/rails/railties/lib/commands/about.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:4
(in /www/redmine-0.9.4)
- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
rake aborted!
Access denied for user 'root'@'localhost' (using password: YES)
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `real_connect'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `connect'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
/www/redmine-0.9.4/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name'
/www/redmine-0.9.4/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set'
/www/redmine-0.9.4/app/models/project.rb:54
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/www/redmine-0.9.4/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in `const_missing'
/www/redmine-0.9.4/app/models/attachment.rb:36
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/www/redmine-0.9.4/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
/www/redmine-0.9.4/app/models/message.rb:22
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/www/redmine-0.9.4/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/inflector.rb:361:in `constantize'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `each'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `constantize'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:157:in `observed_class'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:183:in `observed_classes'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:166:in `initialize'
/usr/lib/ruby/1.8/singleton.rb:95:in `new'
/usr/lib/ruby/1.8/singleton.rb:95:in `instance'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:38:in `instantiate_observers'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `each'
/www/redmine-0.9.4/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `instantiate_observers'
/www/redmine-0.9.4/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `send'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/www/redmine-0.9.4/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `send'
/www/redmine-0.9.4/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:631:in `prepare_dispatcher'
/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:185:in `process'
/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/www/redmine-0.9.4/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/www/redmine-0.9.4/config/environment.rb:20
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/www/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/www/redmine-0.9.4/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Replies (2)
RE: RAILS_ENV=production rake db:migrate - Access denied for user - Added by Felix Schäfer over 14 years ago
Maybe your MySQL root password has some special characters not escaped correctly in the database.yml? You could try with a simpler password maybe?
What could also be a problem is if your database.yml is configured to access MySQL over the network as opposed to the mysql CLI tool accessing it over the unix socket, I think you should even be able to check what error MySQL has in its logs.
If this doesn't work, please post your MySQL and rails/ruby/rake versions, als well as your database.yml (minus the password obviously).
RE: RAILS_ENV=production rake db:migrate - Access denied for user - Added by daniel doe over 14 years ago
Sweet Felix that was it!
The password was the problem - my password started with !
All working now thank you very much