我在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连接到数据库。我怎样才能做到这一点?我的意思是,我怎样才能查询这个变量?
您必须通过编程语言中提供的机制来读取环境变量。你使用哪一个? – 2014-12-06 22:49:54
@ timo.rieber我使用java。 (JBoss javaee)。 – 2014-12-07 04:19:33