Solved

Configure PostgreSQL with remote management via pgAdmin III

Posted on 2008-11-02
4
2,292 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
ID: 22865118
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
ID: 22866843
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
ID: 22866864
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
ID: 22867591
It could be that PostgreSQL does not listen for TCP connections. Please verify on your server.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.

912 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

24 Experts available now in Live!

Get 1:1 Help Now