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. Using a remote database

Using a remote database

Added by Anurag Bhandari over 11 years ago

My database.yml looks like:

# MySQL (default setup).

production:
  adapter: mysql
  database: openproject
  host: 10.10.10.40
  username: openproject
  password: <hidden>
  encoding: utf8

rake db:create:all fails with the following message:
This task only modifies local databases. openproject is on a remote host.

How can I configure OpenProject to work with a database installed on a server other than where OP is installed?


Replies (2)

RE: Using a remote database - Added by Jens Ulferts over 11 years ago

Hi Anurag,

I fear rails no longer allows creating a remote database via db:create 1.

So you will have to do it by hand, which is not really hard to do. Connect to the DBMS and create the db by inserting:

CREATE DATABASE openproject CHARACTER SET utf8;
CREATE USER 'openproject'@'localhost' IDENTIFIED BY '<password of your choice>';
GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'@'localhost';

The other commands like db:migrate should work fine from there.

BTW, we switched to mysql2 a while ago so this is way better tested.

Regards

Jens

RE: Using a remote database - Added by Anurag Bhandari over 11 years ago

Thanks, Jens. That worked! :)

I was able to finish the installation and run OP’s dev webserver on our domain’s port 3000. All worked fine. Now I want to configure OP such that:

  • it’s hosted on nginx rather than its own dev webserver
  • it runs on port 80
  • it’s associated with a subdomain

Any clues or pointers would help. Pardon me, but I’m very new to RoR.

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