Connect to PostgreSQL on OpenShift with PgAdmin

30.12.2015 15:32:35

First you will need username and password to your PostgreSQL cartridge. You can get them when you run rhc apps

Next run: rhc port-forward -a APP_NAME This will bind remote PostgreSQL instance to localhost and port 5432 (btw. if you already run PostgreSQL on your computer, it will automatically change that port to 5433).

Note: Currently make sure you use Ruby 1.9.x, otherwise you will get hard-to-debug errors.

Now open pgAdmin and set values:

Name = whatever you like :-)

Host = localhost

Port = 5432 (or something else)

Maintenance DB = APP_NAME

Username = username from rhc apps

Password = password from rhc apps

And your're done :-)

© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.

Made better & faster using Java Profiler