LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-28-2003, 01:12 AM   #1
richard22
Member
 
Registered: Apr 2001
Posts: 60

Rep: Reputation: 15
postgres connect


Using both phppgadmin and pgimport. I'm having real problems connecting to a postgres database on another server. It probably simple but cant think what I am doing wrong. I have tried http://IP address http://dns name and http://machinename.domain but just get error unknown host. I'm trying to migrate from mysql to postgres on linux, please excuse my ignorance but what is wrong with my syntax

Richard
 
Old 01-28-2003, 11:26 PM   #2
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 949

Rep: Reputation: 51
Re: postgres connect

Quote:
Originally posted by richard22
Using both phppgadmin and pgimport. I'm having real problems connecting to a postgres database on another server. It probably simple but cant think what I am doing wrong. I have tried http://IP address http://dns name and http://machinename.domain but just get error unknown host.
I'm wondering if you have a DNS problem and not a PostgreSQL one. What happens when you try to ping the database server? Also, PostgreSQL by default listens on port 5432. If you're trying to connect to the database server using your web browser you'll normally be connecting to port 80. If I try connecting to port 5432 using Mozilla I get a ``The document contains no data.'' and not the one you're reporting.

Also, have you gotten into the `pg_hba.conf' file and set up the records that control what hosts are allowed to connect to the database server?

Can you post exectly what commands you're trying? And the exact error messages? (Check out the ``script'' command for a nifty way to capture this stuff.)

Good luck...
Rick
 
Old 01-29-2003, 01:22 AM   #3
richard22
Member
 
Registered: Apr 2001
Posts: 60

Original Poster
Rep: Reputation: 15
DNS is, fine the network is running no problems.

With pgimport it is a gui that requires server name, port, user and password. I have postgres up and running on both local and server machines. I try to connect using port 5432 to both local and network using both a setup user and postgres but in both instances I get - could not connect to server connection refused is server running on host localhost/servername and accepting tcp/ip connections on port 5432.

With phpPgAdmin I can only access if I make adv_auth false in config.inc.php. But then I dont seem to be able to actually update anything, presumably because I have bypassed authorisation.

Any thoughts on this, I can't find anything on the web.

Regards Richard
 
Old 01-29-2003, 11:48 AM   #4
fff
LQ Newbie
 
Registered: Oct 2001
Location: France
Distribution: Mandrake 8.1
Posts: 7

Rep: Reputation: 0
did you launch Postresql with the -i option ?

==> this option allows "IP" connections, i.e. connections from another machine.

FFF
 
Old 01-29-2003, 12:42 PM   #5
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 949

Rep: Reputation: 51
Quote:
Originally posted by fff
did you launch Postresql with the -i option ?

Nice catch! Without that switch it won't matter if pg_hba.conf is setup correctly or not.

You should be able to tell whether the `-i' switch was used by running `ps -ef' and grepping for postmaster. Or you could run `netstat -a' and grep for `postgres' (or `netstat -an' and grep for `5432').

If this turns out to be the problem, you'd have to fix it by editing the postgresql script in (probably) /etc/rc.d/init.d and adding the switch to the line that starts postmaster.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to connect to postgres from php jkmartha Linux - Software 1 07-04-2005 02:51 AM
Postgres Hiper1 Linux - Newbie 8 04-10-2005 05:43 PM
Uninstalling Postgres alejandroye Mandriva 3 01-17-2005 01:42 PM
postgres data jamna17 Linux - Newbie 4 04-07-2004 05:45 AM
connect two databases using postgres? w0000422 Programming 3 02-21-2004 02:18 PM


All times are GMT -5. The time now is 03:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration