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. mysql-Installation

mysql-Installation

Added by Johannes Keppler almost 11 years ago

Hi!

I try to install openproject since a few days and I get stuck erverytime at the mysql Configuration.

I strong keep whith the Install-Instruction for Windows.

At the Point ‘Setup databases according to instruction in the manual. (I followed the Ubuntu Steps)*’ I’m lost.

HOW do I setup up the Database at the Windows-Console without any mysql-tools?! Where are they? How to Setup?

Everything ran fine due this Point…
If I install a Third-Party-Tool to Setup the DB, there is no MySQL-Server to be found.

What do I wrong? I’m very frustrated…

Thanks for help…

Best, Syn


Replies (8)

RE: mysql-Installation - Added by Linda Tomlin over 10 years ago

I’m at exactly the same point with the same problem. This is way too complicated for me, managed all the other steps but now have no clue what to do next. Surely there is an installation package for non techies to use? Actually just read that the other person who logged this problem did so 18 days ago and no replies, so I’m giving up. Just not worth the headache.

RE: mysql-Installation - Added by Johannes Keppler over 10 years ago

Hi Linda,

so because there is no Answer we switched to LibreProject.
Easier Installation, more Features, better Usabilitiy…

If you want to try OpenProject any longer, I handeled this Problem by installing first a WAMP-Server.
There’s an mysql-server included and I used this one to install the DB.

But after this, a lot of Problems came along. After four weeks of trying and a lot frustration the OpenProject runs - for about 3 hours.
I transferd a Project and had a lot of Problems with the Functions and the Usability. So I installed LibreProject and I’m happy (and my Boss, too :-) )…

RE: mysql-Installation - Added by Doug Bartels over 10 years ago

I have the same issue with Windows installation. Documentation is lacking at the point of the following:

Modify database.yml and config.yml according to instruction in the manual. (I followed the Ubuntu Steps)

Setup databases according to instruction in the manual. (I followed the Ubuntu Steps)*.

After doing such, the command to run “bundle exec rake db:create:all” returns an error unable to connect to database…etc.

Everything was going smoothly until this point in the documentation for the windows installation, so after much frustration and no answer here other than to try a different application, II guess I must resort to that until further notice on a fix or update on the installation documentation.

RE: mysql-Installation - Added by Brendan Dunn over 10 years ago

Hi Doug

I am not sure what operating system you are using is it windows and your translating the ubuntu instructions ?

I have the same issue with Windows installation
I followed the Ubuntu Steps

which are here - https://www.openproject.org/projects/openproject/wiki/Installation_Ubuntu
[[https://www.openproject.org/projects/openproject/wiki/Installation_Ubuntu]]

These MYSQL instructions only create the production DB so you should only update database.yml for production and delete the rest

CREATE USER 'openproject'@'localhost' IDENTIFIED BY 'my_password';

Make sure you have changed the “my_password” to a real password or have decided to use “my_password” as your password

Your database.yml should look like (again the password needs to be updated)

production: 
  adapter: mysql 
  database: openproject 
  host: localhost 
  username: openproject 
  password: mypassword 
  encoding: utf8  

comment out the dev and test entries or the install will fail.

RE: mysql-Installation - Added by Doug Bartels over 10 years ago

I am installing on windows and using the instruction per the OP web site documentation on Windows Install.

The instruction indicate to use Ubuntu at the following stage of the installation:

Modify database.yml and config.yml according to instruction in the manual. (I followed the Ubuntu Steps)

Setup databases according to instruction in the manual. (I followed the Ubuntu Steps)*.

There is nothing to indicate that MySQL has been installed on the machine, only that the MySQL connector has installed the mysql2 gem. Is there missing information indicating I need to do a separate MySQL installation?

Is there an issue if I am logged into Windows as a non Admin users?

UPDATE ON WINDOWS INSTALLATION

If it doesn’t seem obvious, you must have an instance of MySQL server running on localhost. Of course you still need to access MySQL server to be able to run any commands such as CREATE USER, etc.
I simply went into the MySQL Command Line Client and did a CREATE DATABASE, CREATE USER, GRANT ALL and FLUSH directly in MySQL.

When I created the DB in the MySQL directly, the db:create:all returned that the DB already existed. I therefore dropped the DB openproject directly in MySQL and ran the command again. Then when I ran db:migrate all tables were created. Then when I did the db:seed the DB was seeded with data.

+
Proceeding from there:+

bundle exec rake db:create:all

bundle exec rake db:migrate

bundle exec rake db:seed

bundle exec rake generate_secret_token

RESULTS:

All seemed to succeed without error and so I proceeded to the next steps in the Windows Installation process.

Proceeding from there:

bundle update

RESULTS:

everything succeeded except that I received this message at the end: Gems in the rmagick were not installed.

Proceeding from there:

bundle exec rake assets:precompile

RESULTS:

rake aborted! Sprockets::FileNotFound: couldn’t find file ‘jquery.ui.all’ (in c:Sites/openproject/app/assets/javascripts/application.js.erb:14)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with —trace)
rake aborted!
Command failed with status (1): [C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe C…]

Proceeding from there:

set Rails_ENV=production

RESUSLTS:

nothing returning as to success or failure)

DOES THIS NEED TO BE CHANGED IN A CONFIG FILE OR RUN AS A COMMAND?

Proceeding from there:

bundle exec rails server

RESULTS:

No apparent error or messages indicating any errors or that the system is running.

+
Proceeding from there:+
I navigate to localhost:3000

RESULT:

Unable to connect

RE: mysql-Installation - Added by Doug Bartels over 10 years ago

I finally have the Rails Server running and listening on 0.0.0.0:3000 However, when I navigate to the localhost:3000 I receive the following:

RESULT:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your OpenProject administrator for assistance.

If you are the OpenProject administrator, check your log files for details about the error.

Back

COMMAND LINE RESULTS:

C:\Sites\openproject>bundle exec rails server
require ‘rails/all’… 1.327s
Bundler.require… 3.900s
=> Booting Thin
=> Rails 3.2.19 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Application.initialize!… [deprecated] I18n.enforce_available_locales will defa
ult to true in the future. If you really want to skip validation of your locale
you can set I18n.enforce_available_locales = false to avoid this message.
11.700s
Thin web server (v1.6.2 codename Doc Brown)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Started GET “/” for 127.0.0.1 at 2014-09-08 10:50:27 –0600
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/base (79.0ms)
Completed 500 Internal Server Error in 535.0ms

ActionView::Template::Error (favicon.ico isn’t precompiled):
36:

<meta name="current_menu_item" content="<%= current_menu_item %>

" />
37:

<meta name="accessibility-mode" content="<%= current_user.impaired? %>

"
/>
38: <%= csrf_meta_tags %>
39: <%= favicon_link_tag ‘favicon.ico’ %>
40: <%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => “al
l” %>
41: <% if User.current.impaired? && accessibility_css_enabled? %>
42: <%= stylesheet_link_tag ‘accessibility’ %>
lib/open_project/themes/view_helpers.rb:53:in `image_path’
app/views/layouts/base.html.erb:39:in `_app_views_layouts_base_html_erb__42677
413_59422236’

Started GET “/” for 127.0.0.1 at 2014-09-08 10:50:36 –0600
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/base (6.0ms)
Completed 500 Internal Server Error in 27.0ms

ActionView::Template::Error (favicon.ico isn’t precompiled):
36:

<meta name="current_menu_item" content="<%= current_menu_item %>

" />
37:

<meta name="accessibility-mode" content="<%= current_user.impaired? %>

"
/>
38: <%= csrf_meta_tags %>
39: <%= favicon_link_tag ‘favicon.ico’ %>
40: <%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => “al
l” %>
41: <% if User.current.impaired? && accessibility_css_enabled? %>
42: <%= stylesheet_link_tag ‘accessibility’ %>
lib/open_project/themes/view_helpers.rb:53:in `image_path’
app/views/layouts/base.html.erb:39:in `_app_views_layouts_base_html_erb__42677
413_59422236’

RE: mysql-Installation - Added by Brendan Dunn over 10 years ago

Hi Doug

Well done so far

You will also have to modify the way static assets are managed in the production.rb file to run prod using rails.

sudo nano /home/openproject/openproject/config/environments/production.rb 

change false to true.

config.serve_static_assets = true 

If you decide to run prod in apache, you need to change this back to false and precompile the static assets.

Also try to run the rake commands specifically for prod.
The specific prod commands I use are

RAILS_ENV=production bundle exec rake generate_secret_token 
RAILS_ENV=production bundle exec rake db:create:all 
RAILS_ENV=production bundle exec rake db:migrate 

Please make sure the generate secret token works, the approach has just recently changed and you now have to edit the secrets.yml file in later rails versions.
the precompile command when running under apache is below but I think the error is a reaction to the incorrect production.rb file setting for how to serve the static assets.

RAILS_ENV=production  rake assets:precompil

cheers
Brendan

RE: mysql-Installation - Added by Doug Bartels over 10 years ago

Thanks for a reply Brandon,

RE: config.serve_static_assets=true - As per instruction on Windows Installation, I had previously changed config.serve_static_assets = true ALSO OF NOTE: your directory structure is different than mine. Mine is as follows: ..Sites\openproject\config\environments\production.rb WHEREAS YOURS is as follows ..\openproject\openproject\config\environments\production.rb

RE: Running the Commands - as per your direction, when I do, the commands are not recognized. I tried doing this with the rake assets:precompile command many times yesterday without success. See what was returned when I ran the commands as per your direction:

C:\Sites\openproject>RAILS_ENV=production bundle exec rake generate_secret_token

‘RAILS_ENV’ is not recognized as an internal or external command,
operable program or batch file.

RE: Making sure the secret token works - How will I know if the secret token works. there is no documentation in the installation instruction or elsewhere, describing how I would know if the secret token is working.

Thanks Brandon…

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