Solved

Configure PostgreSQL with remote management via pgAdmin III

Posted on 2008-11-02
4
2,289 Views
Last Modified: 2013-12-16
I have a Ubuntu Server setup at a friends house and I want to be able to manage PostgreSQL from my house via pgAdmin III for Windows. I'm connected to the box though SSH and have port forwarding properly configured (Port 5432).

I'm not sure if I messed something up with the "pg_hba.conf" file and the rest of the postgres configuration so if you could explain how to restore the original Postgres configuration (either by uninstalling it and reinstalling it, or if there is a general way to revert changes to setup defaults) - this way we can rule out any mistakes I made.
0
Comment
Question by:troubledFish
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
thewild earned 500 total points
Comment Utility
You can recreate the entire database cluster with initdb.
This will create a new pg_hba.conf file in the specified directory.

initdb --pgdata <your_database_directory>


Do not run this as root, you should run it as the user that will own the postgresql process.
0
 

Author Comment

by:troubledFish
Comment Utility
Could that be my problem? Because I was modifying the "pg_hba.conf" file with the command "sudo vi /etc/postgresql/8.3/main/pg_hba.conf".
0
 
LVL 4

Expert Comment

by:thewild
Comment Utility
Your problem might be here, indeed.
You should check that the user running postgresql has the appropriate rights on your database cluster directory.
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
It could be that PostgreSQL does not listen for TCP connections. Please verify on your server.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now