나는 openshift에 새 데이터베이스를 creted했습니다openshift에서 데이터베이스에 연결하는 방법은 무엇입니까?
PostgreSQL 9.2 database added. Please make note of these credentials:
Root User: xxxxxxxxx
Root Password: xxxxxxxxxx
Database Name: xxxxxxxx
Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT
내가 psql를 통해 수동으로 데이터베이스에 연결해야합니다. 어떻게해야합니까? 내 말은, 어떻게 변수를 물을 수 있니?
프로그래밍 언어에서 사용할 수있는 메커니즘을 통해 환경 변수를 읽어야합니다. 어느 쪽을 사용합니까? –
@ timo.rieber 자바를 사용합니다. (JBoss javaee). –