Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video

      Welcome to OpenProject Community

      Get an overview

      Get a quick overview of project management and team collaboration with OpenProject.
      You can restart this video from the help menu

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Forums
  • Support Installation & Updates

Content

mysql2 adapter denies credentials on configure openproject

Added by Thomas Wunner about 6 years ago

Hi,

for some strange reasons, I could not connect to my database for the openproject installation using the mysql2 adapter. With my local mysql client it works perfect with the same password.

I followed the instuctions from here (without -ce suffix): https://community.openproject.com/topics/5360

The system is an Ubuntu Server 14.04 LTS with Plesk admin panel.

The output during the configuration task:

DONE
[openproject] ./bin/configure
[legacy-installer] ./bin/preinstall
[mysql] ./bin/preinstall
[apache2] ./bin/preinstall
[repositories] ./bin/preinstall
[smtp] ./bin/preinstall
[memcached] ./bin/preinstall
No memcached server to install. Skipping.
[openproject] ./bin/preinstall
[legacy-installer] ./bin/postinstall
[mysql] ./bin/postinstall
Generating /etc/openproject/conf.d/database...
[apache2] ./bin/postinstall
[repositories] ./bin/postinstall
[smtp] ./bin/postinstall
[memcached] ./bin/postinstall
[openproject] ./bin/postinstall
rake aborted!
Mysql2::Error: Access denied for user 'openproject'@'127.0.0.1' (using password: YES)
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/mysql2-0.3.20/lib/mysql2/client.rb:70:in `connect'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/mysql2-0.3.20/lib/mysql2/client.rb:70:in `initialize'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/connection_handling.rb:87:in `connection'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/model_schema.rb:230:in `table_exists?'
/opt/openproject/config/initializers/30-redmine.rb:36:in `<top (required)>'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:268:in `load'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:268:in `block in load'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:268:in `load'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:652:in `block in load_config_initializer'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/notifications.rb:166:in `instrument'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:651:in `load_config_initializer'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:615:in `each'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:615:in `block in <class:Engine>'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:30:in `instance_exec'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:30:in `run'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:44:in `each'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/initializable.rb:54:in `run_initializers'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/application.rb:352:in `initialize!'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in `public_send'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in `method_missing'
/opt/openproject/config/environment.rb:34:in `<top (required)>'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `require'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `block in require'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `require'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/application.rb:328:in `require_environment!'
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Two other issues:
1st: In /home/openproject is empty
2nd: I was not able to use strong password, because the test database connection uses an URI that does not URI encode the given password. So every special char is not allowed here. I am not familiar with ruby, so I can´t fix it for myself.

Any help would be welcome.

Cheers,

Thomas


Replies (4)

RE: mysql2 adapter denies credentials on configure openproject - Added by Florian Seybold almost 6 years ago

Similar problem here.

Running packaged openproject 5.0.20 on CentOS 6.
After upgrading to latest 6.0.x release the mysql connection is refused.
The initial openproject configure ran without errors but the website shows a 503 error.
In the logs there’s a mysql2 connection closed error.
Also I’m not able to run reconfigure/configure due to mysql connection rejection.

Not even a connect to mysql via cli is working anymore.

Any conclusions?

By the way, upgrade from 5.0.17 to 5.0.20 ran without any problem.

RE: mysql2 adapter denies credentials on configure openproject - Added by Oliver Günther almost 6 years ago

Hi guys,

could you check the output of openproject config and see whether the DATABASE_URL contains the correct password? We have had issues with some characters in that URI before and I’m not certain that is fully resolved (as you mentioned, Thomas).

Florian: What error do you get when running openproject reconfigure@ ? That shouldn’t access the database until you’ve configured your MySQL connection. If you can’t connect with the credentials manually, I suspect something is at fault with your MySQL server itself.

Best,
Oliver

RE: mysql2 adapter denies credentials on configure openproject - Added by Florian Seybold almost 6 years ago

Hello Oliver,

thanks for your response.

With 5.0.20 everything works flawless.
I can get the URL with openproject config:get DATABASE_URL
I also can connect to the DB via mysql cli with the given password of the output of the command above.

After upgrading to 6.0.x:

  • I get an 503
  • output of openproject config:get DATABASE_URL is the same as with 5.0.20
  • I can’t connect via mysql cli
  • the error of openproject reconfigure is, that the connection can’t be established in the last database config step (use existing database).

By the way, copy and paste would be nice in this tui for entering the password. :-)

I got a snapshot from my VM with 5.0.20 so yes, the error is reproduceable (I already did twice).

I don’t think its a database related problem.

RE: mysql2 adapter denies credentials on configure openproject - Added by Mauro Miotello over 4 years ago

I’ve same issue and i discovered that openproject don’t want db psw using chars lik %

  • (1 - 4/4)
Loading...