pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tony <tony@uickarate.com>
To: Michael Stephenson <mstephenson@tirin.openworld.co.uk>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: JDBC prob.  Continued
Date: Thu, 16 Nov 2000 11:41:33 -0500
Message-ID: <009301c04fec$15835aa0$32fea8c0@tonydesktop> (raw)
References: <Pine.LNX.4.10.10011161730190.12023-100000@tirin.openworld.co.uk>

The host could be just localhost
if this is running only on localhost, right?
Or do I have to specify an IP?

Thanks,


Tony


----- Original Message -----
From: "Michael Stephenson" <mstephenson@tirin.openworld.co.uk>
To: "tony" <tony@uickarate.com>
Cc: "pgsql-interfaces" <pgsql-interfaces@postgresql.org>
Sent: Thursday, November 16, 2000 12:37 PM
Subject: Re: [INTERFACES] JDBC prob. Continued


> On Thu, 16 Nov 2000, tony wrote:
>
> > I'm using 7.0.
> > Greg told me that SQLException is thrown by
> > getConnection();
> > so I've changed by getConnection to
> > DriverManager.getConnection("jdbc:postgresql:database_name", "postgres",
> > "password");
> > and the error changed to something like this:
> > SQLException: Connection refused.  Check that th ehostname and port is
> > correct, and
> > tha thte postmaster is runing with the -i flag, which enables TCP/IP
> > networking.
> >
> > Any ideas??
>
> >From reading the error message I'd suggest, either you have the hostname
> and port incorrect, correct use is:
>
> DriverManager.getConnection(
> "jdbc:postgresql://[host]:[port]/[db_name]",
> "[username]", "[password]");
>
> Or you're not running postmaster with the -i flag, I use:
>
> postmaster -i -p [port] -D [data directory]
>
> If it's neither of those, then I'm sorry for being patronising.
>
> Hope this helps,
>
> Michael Stephenson
>
>




view thread (8+ messages)  latest in thread

Message-ID: <009301c04fec$15835aa0$32fea8c0@tonydesktop>
Permalink:  ../009301c04fec$15835aa0$32fea8c0@tonydesktop/
Also on:    postgresql.org/message-id/009301c04fec$15835aa0$32fea8c0@tonydesktop

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tony@uickarate.com, mstephenson@tirin.openworld.co.uk
  Subject: Re: JDBC prob.  Continued
  In-Reply-To: <009301c04fec$15835aa0$32fea8c0@tonydesktop>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox