Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise 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?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. [SOLVED] MySQL Error after updating from 6.0.0 -> 6.0.3 packaged

[SOLVED] MySQL Error after updating from 6.0.0 -> 6.0.3 packaged

Added by Martin Dunn over 8 years ago

After updating my OpenProject 6.0.0 installation to 6.0.3 (Packaged installation, CentOS) i get the following error after running openproject configure

rake aborted! Mysql2::Error: Can't connect to MySQL server on '127.0.0.1' (111) /opt/openproject/vendor/bundle/ruby/2.1.0/gems/mysql2-0.4.3/lib/mysql2/client.rb:87:in `connect' /opt/openproject/vendor/bundle/ruby/2.1.0/gems/mysql2-0.4.3/lib/mysql2/client.rb:87:in `initialize'

Also tried command openproject reconfigure just incase, but still having the same error.

Didn’t change any other settings prior or after updating.

Using mysql -u openproject -p i am able to connect to MySQL without problems
Checked the installer.dat file in /etc/openproject but settings seems to be correct.


Replies (3)

RE: MySQL Error after updating from 6.0.0 -> 6.0.3 packaged - Added by Martin Dunn over 8 years ago

Resolved the issue but don’t really understand why the problem occurred.

Tried to change my MySQL host from 127.0.0.1 to localhost, using openproject config:set HOST=localhost, checked and it changed the value, but after running openproject configure is changed back to ‘127.0.0.1’. Checked the /etc/openproject/installer.dat file but couldn’t find a value for this.

So eventually, hardcoded ‘localhost’ in file /opt/openproject/vendor/bundle/ruby/2.1.0/gems/mysql2-0.4.3/lib/mysql2/client.rb:87 on the error line, which fixed my issue.

So either way, 2 questions;

- How could this error occur, as the system setup didn’t change
- How can i change the HOST setting the proper way without the hardcode hack

RE: MySQL Error after updating from 6.0.0 -> 6.0.3 packaged - Added by Oliver Günther over 8 years ago

Hi Martin,

the MySQL hostname is not the same as the HOST config variable, the latter is for controlling the host used by OpenProject.

The MySQL connection URL is set in /etc/openproject/conf.d/database, where you can change the value.
Also, you can use openproject reconfigure, and choose existing MySQL installation to upgrade credentials.

Best,
Oliver

RE: MySQL Error after updating from 6.0.0 -> 6.0.3 packaged - Added by Martin Dunn over 8 years ago

Hi Oliver,

Thanks for the clarification on this, will change the database configuration the correct way.

Regards,
Martin

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