Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Configure PostgreSQL with remote management via pgAdmin III

Posted on 2008-11-02
4
Medium Priority
?
2,322 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

927 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