Solved

Configure PostgreSQL with remote management via pgAdmin III

Posted on 2008-11-02
4
2,295 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 62

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.
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.

777 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