/********************************************************************
* 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密码。

Redmine 数据库连接错误的更多相关文章

  1. kettle菜鸟学习笔记3----kettle数据库连接错误及解决

    数据库连接测试时,所有的参数信息都填写正确,却报错了. 或者,没有进行数据库连接测试,直接保存了当前数据库连接,然后在浏览,选择目标表时报错: 或者其他别的关于数据库连接的错误…… 第一个要考虑的就是 ...

  2. win下安装Redmine常见错误解决方案

    成长型公司,最近需要项目管理的软件,所以在windows的服务器上搭建了redmine,其中也遇到了两个坑,现记录下来. Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的 ...

  3. web页面过一段时间再次访问时显示数据库连接错误

    这个问题是我之前遇到的,过了很久才想着去解决它,因为这也没多大影响,无非就是再访问一次的问题,后来有一次观察网站的运行情况时,发现这个问题还挺严重,如果一直用,就不会出现问题,如果中间歇一会,再用就会 ...

  4. SQL数据库 开启时出现 数据库连接错误2,error:40的问题。如何解决

    错误如下:(原因是sql server服务停止) 解决这个问题,就需要启动sql server服务:主要有三种方法: 一.(后台启动服务) 1.开始->控制面板: 2.管理工具 3.服务 4.把 ...

  5. 网站配置好了,在本地能登录系统,但是挂在IIS上就无法登录了,提示数据库连接错误

    我用的VS2010开发的网站,但是挂在本机的IIS上的时候就无法登录了,提示错误如下:

  6. Java数据库连接错误集

    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after co ...

  7. .NET 通过entity framework报数据库连接错误:ORA-01017: invalid username/password; logon denied

    如题,答案为:[ORA-01017].NET程序连接数据库失败 转载文章内容如下: 遇到问题 使用 C#/.NET 开发的一个客户端程序,需要连接 ORACLE 数据库,使用 Oracle.Manag ...

  8. Foxpro数据库连接错误解决方法--【VFP DBF文件不是一个有效的路径。 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器】

    直接访问vfp dbf文件时报错: 错误描述: 'd:\vfpData\test.dbf'不是一个有效的路径. 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器. 解决办法:Data Sour ...

  9. oracle数据库连接错误解决办法

    ORA-28547 连接服务器失败,可能是Oracle Net 管理错误 原文地址:http://www.linuxidc.com/Linux/2014-11/109686.htm 上周去给客户培训O ...

随机推荐

  1. hdu 1224 最长路

    开始用dijkstra直接求,发现不行,算法问题(1-2,(30),2-4(20),1--3(10),3--4(100)最后一个点无法更新,导致错误),后用取负,加大数法也没过. 现在(寒假了):求负 ...

  2. AC日记——香甜的黄油 codevs 2038

    2038 香甜的黄油 USACO  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond 题解  查看运行结果     题目描述 Description 农夫Jo ...

  3. 2017 ACM/ICPC Asia Regional Qingdao Online 记录

    题目链接  Qingdao Problem C AC自动机还不会,暂时暴力水过. #include <bits/stdc++.h> using namespace std; #define ...

  4. HDU 6149 Valley Numer II(状压DP)

    题目链接 HDU6149 百度之星复赛的题目……比赛的时候并没有做出来. 由于低点只有15个,所以我们可以考虑状压DP. 利用01背包的思想,依次考虑每个低点,然后枚举每个状态. 在每个状态里面任意枚 ...

  5. ROS之:log文件

    1.log文件的位置: log file: /home/wang/.ros/log/... 1)显示隐藏文件(.文件),Ctrl+h 2)该文件夹下的文件夹是运行launch文件产生的 3)该文件夹下 ...

  6. Java下接口interface前面要不要加I

    说明:加I和不加I都可以,看需要,没有强制要求. 在Java中更多是提倡不加I的,可以看下JDK的源码,都是不加I的. 微软C#是规定要加I,这也是影响从而导致有这个话题的原因. Java中特定不直接 ...

  7. Java全局变量不加修饰符时的访问权限范围

    如上图所示.

  8. go语言学习之路三:切片

    前面讲了变量的有关知识,这里对于其他的数据类型就不多作介绍,(和C差不多),因此重点来讨论下切片. 一.切片是引用类型,这里要稍微介绍两个概念:值类型,构造类型和引用类型 1.值类型:是一种由类型的实 ...

  9. 解决filter拦截request中body内容后,字符流关闭,无法传到controller的问题

    解决filter拦截request中body内容后,字符流关闭,无法传到controller的问题 2.问题: 在一般的请求中,content-type为:application/x-www-form ...

  10. Mysql 性能优化20个原则(4)

    16. 垂直分割 “垂直分割”是一种把数据库中的表按列变成几张表的方法,这样可以降低表的复杂度和字段的数目,从而达到优化的目的.(以前,在银行做过项目,见过一张表有100多个字段,很恐怖) 示例一:在 ...