0

I am running openerp(odoo) application from amazon cloud server using putty and it is ubuntu Headless(NO GUI) server. PostgreSQL is the database used for this application. Right now I am only able to access it in command mode as there is no gui in Putty. In Windows, I have installed pgadmin3. Is it possible to access it from here by configuring?

4 Answers 4

1

You can configure your security group to open up the postgres port accessible from your IP address (I would highly recommend the access to be limited that way). After that you can just point your GUI client the external IP address of your instance using the port where the service is running on.

Sign up to request clarification or add additional context in comments.

Comments

1

I suggest you to use pgadmin gui tool to access postgres database.

enter image description here

2 Comments

In putty there is no gui
Dear @Bhanukiran, I agreed with you that putty is not providing gui , but you should install pgadmin3 in your local system and you just need to configure it as per your amazon cloud server postgress access.
1

You can set up an SSH tunnel in putty and use that to access the remote database with your local pgadmin3. This is a very good and secure way to do things.

First, in Putty (Connection / SSH / Tunnels) add a source port of your choice, 5000 for example. Then enter localhost:5432 for Destination (providing postgres is running on port 5432 on the server). Press Add and save your session. Next time you open your ssh connection with Putty, the tunnel will be active.

After this, set up a new connection in pgadmin3, Host: localhost and Port: 5000 (and your username and pasword, of course). Now, if the putty session is active, you should be able to connect.

See this screenshot

2 Comments

I am able to access database in gui by adding my ip address in postgres config file
Yes, that works (if you don't have a firewall blocking the port altogether, which might be a good idea), but an SSH tunnel is more secure and more practical if you're on a dynamic IP.
1

In postgresql.conf file, find a line called listen_addresses = 'localhost' and change it to '*' Next in pg_hba.conf add this line in IPV4 local connections,

host    all        all        (Your external ip address in CIDR format)         trust

Finally restart the database using this command,sudo service postgresql restart

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.