Redmine 数据库连接错误

/********************************************************************
* Redmine 数据库连接错误
* 说明:
* OpenMediaVault上的Redmine出现连接错误,目前不知道是我自己不小心
* 把mysql的密码修改了,还是因为被攻击了,先记录一下。
*
* 2016-8-17 深圳 南山平山村 曾剑锋
*******************************************************************/ 一、参考文档:
. 完整过程解决 ERROR (): Access denied for user 'mysql'@'localhost' (using password: NO)
http://blog.csdn.net/nel0511/article/details/13091163 二、错误现象:
root@workflow:/etc# ruby /usr/share/redmine/bin/rails server -p3000 webrick -e production &
[]
root@workflow:/etc# => Booting WEBrick
=> Rails 3.1. application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/vendor_ruby/mysql2/client.rb::in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql2::Error)
from /usr/lib/ruby/vendor_ruby/mysql2/client.rb::in `initialize'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql2_adapter.rb::in `new'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql2_adapter.rb::in `mysql2_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `new_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `checkout_new_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `acquire_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `block in checkout'
from /usr/lib/ruby/1.1./monitor.rb::in `mon_synchronize'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `checkout'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `block in connection'
from /usr/lib/ruby/1.1./monitor.rb::in `mon_synchronize'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb::in `retrieve_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_handling.rb::in `retrieve_connection'
from /usr/lib/ruby/vendor_ruby/active_record/connection_handling.rb::in `connection'
from /usr/lib/ruby/vendor_ruby/active_record/model_schema.rb::in `table_exists?'
from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb::in `get_primary_key'
from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb::in `reset_primary_key'
from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb::in `primary_key'
from /usr/lib/ruby/vendor_ruby/active_record/mass_assignment_security/attribute_assignment.rb::in `attributes_protected_by_default'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `block in protected_attributes_configs'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `yield'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `protected_attributes'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `block in attr_protected'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `each'
from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb::in `attr_protected'
from /usr/share/redmine/app/models/custom_field.rb::in `<class:CustomField>'
from /usr/share/redmine/app/models/custom_field.rb::in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `block in require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_dependency'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require_or_load'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_missing_constant'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `const_missing'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_missing_constant'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `const_missing'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_missing_constant'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `const_missing'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_missing_constant'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `const_missing'
from /usr/share/redmine/lib/redmine/field_format.rb::in `field_attributes'
from /usr/share/redmine/lib/redmine/field_format.rb::in `<class:Base>'
from /usr/share/redmine/lib/redmine/field_format.rb::in `<module:FieldFormat>'
from /usr/share/redmine/lib/redmine/field_format.rb::in `<module:Redmine>'
from /usr/share/redmine/lib/redmine/field_format.rb::in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `block in require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_dependency'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/share/redmine/lib/redmine.rb::in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `block in require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_dependency'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/share/redmine/config/initializers/-redmine.rb::in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `block in load'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_dependency'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb::in `block in load_config_initializer'
from /usr/lib/ruby/vendor_ruby/active_support/notifications.rb::in `instrument'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb::in `load_config_initializer'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb::in `block ( levels) in <class:Engine>'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb::in `each'
from /usr/lib/ruby/vendor_ruby/rails/engine.rb::in `block in <class:Engine>'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `instance_exec'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `run'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `block in run_initializers'
from /usr/lib/ruby/1.1./tsort.rb::in `block in tsort_each'
from /usr/lib/ruby/1.1./tsort.rb::in `block ( levels) in each_strongly_connected_component'
from /usr/lib/ruby/1.1./tsort.rb::in `block ( levels) in each_strongly_connected_component_from'
from /usr/lib/ruby/1.1./tsort.rb::in `each_strongly_connected_component_from'
from /usr/lib/ruby/1.1./tsort.rb::in `block in each_strongly_connected_component_from'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `each'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `tsort_each_child'
from /usr/lib/ruby/1.1./tsort.rb::in `call'
from /usr/lib/ruby/1.1./tsort.rb::in `each_strongly_connected_component_from'
from /usr/lib/ruby/1.1./tsort.rb::in `block in each_strongly_connected_component'
from /usr/lib/ruby/1.1./tsort.rb::in `each'
from /usr/lib/ruby/1.1./tsort.rb::in `call'
from /usr/lib/ruby/1.1./tsort.rb::in `each_strongly_connected_component'
from /usr/lib/ruby/1.1./tsort.rb::in `tsort_each'
from /usr/lib/ruby/1.1./tsort.rb::in `tsort_each'
from /usr/lib/ruby/vendor_ruby/rails/initializable.rb::in `run_initializers'
from /usr/lib/ruby/vendor_ruby/rails/application.rb::in `initialize!'
from /usr/share/redmine/config/environment.rb::in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `block in require'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `load_dependency'
from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb::in `require'
from /usr/share/redmine/config.ru::in `block in <main>'
from /usr/lib/ruby/vendor_ruby/rack/builder.rb::in `instance_eval'
from /usr/lib/ruby/vendor_ruby/rack/builder.rb::in `initialize'
from /usr/share/redmine/config.ru:in `new'
from /usr/share/redmine/config.ru:in `<main>'
from /usr/lib/ruby/vendor_ruby/rack/builder.rb::in `eval'
from /usr/lib/ruby/vendor_ruby/rack/builder.rb::in `new_from_string'
from /usr/lib/ruby/vendor_ruby/rack/builder.rb::in `parse_file'
from /usr/lib/ruby/vendor_ruby/rack/server.rb::in `build_app_and_options_from_config'
from /usr/lib/ruby/vendor_ruby/rack/server.rb::in `app'
from /usr/lib/ruby/vendor_ruby/rails/commands/server.rb::in `app'
from /usr/lib/ruby/vendor_ruby/rack/server.rb::in `wrapped_app'
from /usr/lib/ruby/vendor_ruby/rack/server.rb::in `start'
from /usr/lib/ruby/vendor_ruby/rails/commands/server.rb::in `start'
from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb::in `block in server'
from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb::in `tap'
from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb::in `server'
from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb::in `run_command!'
from /usr/lib/ruby/vendor_ruby/rails/commands.rb::in `<top (required)>'
from /usr/share/redmine/bin/rails::in `require'
from /usr/share/redmine/bin/rails::in `<main>' []+ Exit ruby /usr/share/redmine/bin/rails server -p3000 webrick -e production 三、解决办法:
修改数据库root密码。
上一篇:Oracle Flashback 闪回


下一篇:Jsp入门EL表达式_学习笔记