This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.

Connect to Database

Option a) via OpenShift

Connect to the database used by the current project:

$ oc rsh -c nice dc/nice psql
psql (9.6.20, server 9.5.24)

nice_master=>

Note

Use option b) if you require superuser privileges.

Option b) via ssh

  1. Identify DB server:

    Look for db_server in config.yml. This is the DB server used by an installation.

  2. ssh into machine:

    $ ssh ${DB_SERVER}
    
  3. connect to Postgres:

    $ psql ${db_name}
    

    Alternatively, if you don’t know the DB name, connect to DB postgres:

    $ psql postgres