Redmine 数据库连接错误

/********************************************************************
 *                    Redmine 数据库连接错误
 * 说明:
 *     OpenMediaVault上的Redmine出现连接错误,目前不知道是我自己不小心
 * 把mysql的密码修改了,还是因为被攻击了,先记录一下。
 *
 *                                  2016-8-17 深圳 南山平山村 曾剑锋
 *******************************************************************/

一、参考文档:
    1. 完整过程解决 ERROR 1045 (28000): 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 &
    [1] 2828
    root@workflow:/etc# => Booting WEBrick
    => Rails 3.1.8 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:70:in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql2::Error)
            from /usr/lib/ruby/vendor_ruby/mysql2/client.rb:70:in `initialize'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
            from /usr/lib/ruby/1.1.0/monitor.rb:211:in `mon_synchronize'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
            from /usr/lib/ruby/1.1.0/monitor.rb:211:in `mon_synchronize'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_handling.rb:113:in `retrieve_connection'
            from /usr/lib/ruby/vendor_ruby/active_record/connection_handling.rb:87:in `connection'
            from /usr/lib/ruby/vendor_ruby/active_record/model_schema.rb:209:in `table_exists?'
            from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb:99:in `get_primary_key'
            from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb:84:in `reset_primary_key'
            from /usr/lib/ruby/vendor_ruby/active_record/attribute_methods/primary_key.rb:72:in `primary_key'
            from /usr/lib/ruby/vendor_ruby/active_record/mass_assignment_security/attribute_assignment.rb:15:in `attributes_protected_by_default'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:332:in `block in protected_attributes_configs'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:217:in `yield'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:217:in `protected_attributes'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:123:in `block in attr_protected'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:122:in `each'
            from /usr/lib/ruby/vendor_ruby/active_model/mass_assignment_security.rb:122:in `attr_protected'
            from /usr/share/redmine/app/models/custom_field.rb:32:in `<class:CustomField>'
            from /usr/share/redmine/app/models/custom_field.rb:18:in `<top (required)>'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `block in require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:232:in `load_dependency'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:348:in `require_or_load'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:480:in `load_missing_constant'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:180:in `const_missing'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:512:in `load_missing_constant'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:180:in `const_missing'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:512:in `load_missing_constant'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:180:in `const_missing'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:512:in `load_missing_constant'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:180:in `const_missing'
            from /usr/share/redmine/lib/redmine/field_format.rb:80:in `field_attributes'
            from /usr/share/redmine/lib/redmine/field_format.rb:83:in `<class:Base>'
            from /usr/share/redmine/lib/redmine/field_format.rb:48:in `<module:FieldFormat>'
            from /usr/share/redmine/lib/redmine/field_format.rb:19:in `<module:Redmine>'
            from /usr/share/redmine/lib/redmine/field_format.rb:18:in `<top (required)>'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `block in require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:232:in `load_dependency'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/share/redmine/lib/redmine.rb:38:in `<top (required)>'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `block in require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:232:in `load_dependency'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/share/redmine/config/initializers/30-redmine.rb:6:in `<top (required)>'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:241:in `load'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:241:in `block in load'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:232:in `load_dependency'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:241:in `load'
            from /usr/lib/ruby/vendor_ruby/rails/engine.rb:648:in `block in load_config_initializer'
            from /usr/lib/ruby/vendor_ruby/active_support/notifications.rb:161:in `instrument'
            from /usr/lib/ruby/vendor_ruby/rails/engine.rb:647:in `load_config_initializer'
            from /usr/lib/ruby/vendor_ruby/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
            from /usr/lib/ruby/vendor_ruby/rails/engine.rb:611:in `each'
            from /usr/lib/ruby/vendor_ruby/rails/engine.rb:611:in `block in <class:Engine>'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
            from /usr/lib/ruby/1.1.0/tsort.rb:226:in `block in tsort_each'
            from /usr/lib/ruby/1.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
            from /usr/lib/ruby/1.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
            from /usr/lib/ruby/1.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
            from /usr/lib/ruby/1.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `each'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `tsort_each_child'
            from /usr/lib/ruby/1.1.0/tsort.rb:411:in `call'
            from /usr/lib/ruby/1.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
            from /usr/lib/ruby/1.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
            from /usr/lib/ruby/1.1.0/tsort.rb:345:in `each'
            from /usr/lib/ruby/1.1.0/tsort.rb:345:in `call'
            from /usr/lib/ruby/1.1.0/tsort.rb:345:in `each_strongly_connected_component'
            from /usr/lib/ruby/1.1.0/tsort.rb:224:in `tsort_each'
            from /usr/lib/ruby/1.1.0/tsort.rb:205:in `tsort_each'
            from /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
            from /usr/lib/ruby/vendor_ruby/rails/application.rb:300:in `initialize!'
            from /usr/share/redmine/config/environment.rb:14:in `<top (required)>'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `block in require'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:232:in `load_dependency'
            from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:247:in `require'
            from /usr/share/redmine/config.ru:3:in `block in <main>'
            from /usr/lib/ruby/vendor_ruby/rack/builder.rb:55:in `instance_eval'
            from /usr/lib/ruby/vendor_ruby/rack/builder.rb:55: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:49:in `eval'
            from /usr/lib/ruby/vendor_ruby/rack/builder.rb:49:in `new_from_string'
            from /usr/lib/ruby/vendor_ruby/rack/builder.rb:40:in `parse_file'
            from /usr/lib/ruby/vendor_ruby/rack/server.rb:277:in `build_app_and_options_from_config'
            from /usr/lib/ruby/vendor_ruby/rack/server.rb:199:in `app'
            from /usr/lib/ruby/vendor_ruby/rails/commands/server.rb:50:in `app'
            from /usr/lib/ruby/vendor_ruby/rack/server.rb:314:in `wrapped_app'
            from /usr/lib/ruby/vendor_ruby/rack/server.rb:250:in `start'
            from /usr/lib/ruby/vendor_ruby/rails/commands/server.rb:69:in `start'
            from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:81:in `block in server'
            from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:76:in `tap'
            from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:76:in `server'
            from /usr/lib/ruby/vendor_ruby/rails/commands/commands_tasks.rb:40:in `run_command!'
            from /usr/lib/ruby/vendor_ruby/rails/commands.rb:17:in `<top (required)>'
            from /usr/share/redmine/bin/rails:4:in `require'
            from /usr/share/redmine/bin/rails:4:in `<main>'

    [1]+  Exit 1                  ruby /usr/share/redmine/bin/rails server -p3000 webrick -e production

三、解决办法:
    修改数据库root密码。

 

时间: 2024-09-29 08:34:26

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

数据库 sqlserver-问题:帮我看看这个数据库连接错误是什么类型的。

问题描述 问题:帮我看看这个数据库连接错误是什么类型的. 我用的VS2010,调试的时候报的错如下:尝试为文件 ......App_Dataaspnetdb.mdf 附加自动命名的数据库,但失败.已存在同名的数据库,或指定的文件无法打开或位于 UNC 共享目录中.这到底是什么情况啊 解决方案 我自己解决了,谢谢. 自己写的DbHelper里定义静态的数据库连接字段时应该用config文件里的之间的项目名称的名字,用到哪个项目,前面的静态变量也要变. 解决方案二: 去掉mdf 文件的readonl

Ubuntu VPS中wordpress网站打开时提示”建立数据库连接错误”的解决办法_php实例

一.发现问题 在尝试编辑博客站点的Wordpress主题时,突然发现博客站点无法连接:刷新后提示"建立数据库连接错误"之类的错误.自然想到是mysql可能出错了,所以就登陆了VPS主机,尝试启动mysql服务,但是提示failed. 二.解决方法 1.打开/var/log/mysql/error.log文件,查看出错日志.在阅读日志时发现第一条错误提示是:[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrad

数据库连接错误

问题描述 publicstaticDataSetreDs(stringP_str_cmdtxt){SqlConnectioncon=DB.GetCon();//连接上数据库SqlDataAdapterda=newSqlDataAdapter(P_str_cmdtxt,con);DataSetds=newDataSet();da.Fill(ds);returnds;//返回DataSet对象}}错误:在与SQLServer建立连接时出现与网络相关的或特定于实例的错误.未找到或无法访问服务器.请验证

数据库连接- 错误源:.Net SqlClient Data Provider 错误信息:对象名“***”无效 请问怎么解决呢

问题描述 错误源:.Net SqlClient Data Provider 错误信息:对象名"***"无效 请问怎么解决呢 错误源:.Net SqlClient Data Provider 错误信息:对象名"***"无效 请问怎么解决呢 应该是已经连接了数据库,但是出现表的无效,初学,望高手予以解答 SqlConnection conn = new SqlConnection(@"server = .sqlexpress; integrated secur

可以让程序告诉我详细的页面错误和数据库连接错误吗?_编程10000问

<%  If Err.Number <> 0 Then ' 错误处理.       Response.Clear       ' 清除缓冲区.       Select Case Err.Number            ' 根据不同错误分处理.    Case "" ' 指定错误类型:此处填加我们指定的错误处理代码.      Case Else  ' 一般错误.             If IsObject(objConnection) Then       

数据库连接错误问题???

问题描述 首先说明,数据库连接地址用户名都是对的!就是老是抛出异常?mysqlCon.java:packageDemo;importjava.sql.*;publicclassmysqlCon{privatefinalStringuName="root";privatefinalStringuPwd="gaoshuai";privatefinalStringdb="tree";privateStringurl="http://local

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

直接访问vfp dbf文件时报错: 错误描述: 'd:\vfpData\test.dbf'不是一个有效的路径. 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器. 解决办法:Data Source=目录!!!!!!(d:\vfpData) (1)------------------------------------------------------------------------------------------------ Microsoft Jet OLE DB 4.0 S

oracle数据库连接错误-关于oracle的一个问题

问题描述 关于oracle的一个问题 问题是这样的 我在linux系统上安装了虚拟机,虚拟机里安装了xp系统,然后在xp系统了安装了oracle客户端,并且一切正常,而且安装了plsql工具也一切正常可以使用,随后我将虚拟机里的xp系统导了出来, 问题来了 将导出的xp系统导入了另一台笔记本里的虚拟机 此时oracle客户端不能使用了 大神给分析下 是不是需要配置下什么 ??感激不尽 解决方案 http://q.cnblogs.com/q/60437/

Server Application Error 8004EOOF错误

终于有点时间了,想在本机上装个zblog1.8正式版测试一下,顺便做个主题结果开始的时候连不上数据库,总是报错,运行权限向导也不行重装了一下IIS,结果报了个错误 Server Application ErrorThe server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more d