X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 717869F946D for ; Tue, 9 May 2006 10:01:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 55416-05 for ; Tue, 9 May 2006 10:01:34 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id 48CF79F931D for ; Tue, 9 May 2006 10:01:33 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id i20so1176899wra for ; Tue, 09 May 2006 06:01:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dBNLx4o6F8TLl6MqmroZFoh3FUwTtcMrVRDHGCQmjLf7W8KyB01SFxZL/Rd02yeTKKpJDCEX5bupFO/e6qxsUdrRQolqTCWUD+iWnOUZetSHee16JHMq1h1mCXTh2vp+dnoTB+cwXHgzcqAWEt0lSZ9UyrLr65Jh5nrC4FBXR9I= Received: by 10.65.105.8 with SMTP id h8mr1663958qbm; Tue, 09 May 2006 06:01:30 -0700 (PDT) Received: by 10.65.122.17 with HTTP; Tue, 9 May 2006 06:01:30 -0700 (PDT) Message-ID: Date: Tue, 9 May 2006 14:01:30 +0100 From: "System Consult" To: andy.shellam@mailnetwork.co.uk Subject: Re: Locallhost Windows installation In-Reply-To: <44608014.2dfaf20b.6464.ffffcbcfSMTPIN_ADDED@mx.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12418_24507128.1147179690518" References: <44608014.2dfaf20b.6464.ffffcbcfSMTPIN_ADDED@mx.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/84 X-Sequence-Number: 21616 ------=_Part_12418_24507128.1147179690518 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline this has been installed successfully. the new problem is C:\Program Files\PostgreSQL\8.1\bin>createdb HtlMgmtDB Password: createdb: could not connect to database postgres: FATAL: password authenticatio n failed for user "afolorunsho" afolorunsho is the user that signed on windows operating system. this was the same person who installed the dbase, hence authorised user. i went through the documentation and the explanation there are not specific. What have i done wrong? what have i not done? any help will be appreciated pls. another question do i have to go through all these in order to install on a client machine, especially where the only use for it is to connect through = a java application as a database. On 09/05/06, Andy Shellam wrote: > > > however, now that i have installed not as a service, how do i correct > it? > > > > If this is a new installation and you've not loaded any data yet, I'd say > the easiest way would be to uninstall and re-install it again (it would a= lso > give you chance to double-check where the data directory is for reference= , > although you don't particularly need to know this (except maybe for > file-system-level backups.) > > > > > since i intend to use this with java applications which are going to be > distributed, does one need to activate the server in order to access the > database too or one can access the database directly. > > > > All SQL transactions go through the PostgreSQL server =96 on Windows this= is > using an ODBC / OLE DB driver. You will never be able to read the data o= ut > of the flat files, so yes you need PostgreSQL to be running to access it > (hence the best approach is to leave the service to start automatically, = so > if the server reboots, PostgreSQL will be already running again.) > > > > All connections go through port 5432 (the default) so make sure this is > opened up on your firewall (on Windows 2003 R2 or XP SP2 don't forget to > check the Windows Firewall.) > > > > If your Java apps accessing PostgreSQL go through TCP/IP (i.e. they sit o= n > client machines on a LAN and talk back to the server), you will need to e= dit > your pg_hba.conf file (access through the Start menu > Programs > > PostgreSQL). And add a line like (under # IPv4=85) > > > > host user database 192.168.1.0/24 md5 > > > > Replace "user" with your Java apps connection user (or you can set it to > "all" to allow any user access) > > Replace "database" with the database name of your app (or you can set it > to "all" to allow any access to any database) > > Replace 192.168.1.0/24 with your network's IP range (or if you don't want > to restrict to any particular network, use 0.0.0.0/0.) > > > > Md5 is the authentication method =96 you can set to "trust" instead of md= 5 > to allow any connection without a password being required (this should be > restricted to the localhost (127.0.0.1/32) only, or at worst, your local > network for obvious security reasons). However md5 states that a valid > password must be required to connect. I believe you can use crypt as wel= l. > > > > Well done on choosing PostgreSQL! I'm sure when you get up and running t= o > know the system you'll be glad of the choice you made. > > > > Andy > > > PS. Don't forget to CC the mailing list into your responses so others ca= n > follow the conversation. > > > > > > > ------------------------------ > > *From:* System Consult [mailto:systemconsult@gmail.com] > *Sent:* 09 May 2006 12:27 pm > *To:* andy.shellam@mailnetwork.co.uk > *Subject:* Re: [ADMIN] Locallhost Windows installation > > > > thanks a million for this enlightenment. however, now that i have > installed not as a service, how do i correct it? then, since i intend to = use > this with java applications which are going to be distributed, does one n= eed > to activate the server in order to access the database too or one can acc= ess > the database directly. > > > > thanks upfront > > > > On 09/05/06, *Andy Shellam* wrote: > > You should ideally install it as a Windows service. You can restrict > access to the server using the pg_hba.conf to the local machine only so > other network machines cannot connect. The windows service means that > PostgreSQL can be controlled automatically at startup, rather than have t= o > be started manually. > > > > You define the data directory in the MSI installer (although I believe > this is my default under C:\Program Files\PostgreSQL\Data.) > > > > To use the database, you need a management program, such as PgAdmin III = =96 > this ships with the MSI installer, if you install this at the same time a= s > you install Postgres, it'll add a connection to PgAdmin for the local > server. > > > > The latest version manual can be found on the documentation website =96 > that'll give you any information you need regarding config files etc. > > > > Andy > > > ------------------------------ > > *From:* pgsql-admin-owner@postgresql.org [mailto: > pgsql-admin-owner@postgresql.org] *On Behalf Of *System Consult > *Sent:* 09 May 2006 10:47 am > *To:* pgsql-admin@postgresql.org > *Subject:* [ADMIN] Locallhost Windows installation > > > > Im a new user, having read so much about the database. > > > > i installed the binary version successfuly on windows. I did not install > as a service, as all access have to be through the local host, via a > program(java). Now how do i create the database at a specified directory = and > start using this. > > > > kind and urgent assistance required > > > > > !DSPAM:14,44607c8c34491598092421! > ------=_Part_12418_24507128.1147179690518 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
this has been installed successfully. the new problem is
C:\Program Files\PostgreSQL\8.1\bin>createdb HtlMgmtDB
Password:=
createdb: could not connect to database postgres: FATAL:  password= authenticatio
n failed for user "afolorunsho"
 
afolorunsho is the user that signed on windows operating system. this = was the same person who installed the dbase, hence authorised user. i went = through the documentation and the explanation there are not specific. What = have i done wrong? what have i not done? any help will be appreciated pls.
 
another question do i have to go through all these in order to install= on a client machine, especially where the only use for it is to connect th= rough a java application as a database.
 


 
On 09/05/06, Andy Shellam <and= y.shellam@mailnetwork.co.uk> wrote:

> however, now tha= t i have installed not as a service, how do i correct it?

 

If this is a new installation and y= ou've not loaded any data yet, I'd say the easiest way would be to uninstal= l and re-install it again (it would also give you chance to double-check wh= ere the data directory is for reference, although you don't particularly ne= ed to know this (except maybe for file-system-level backups.)

 

 

All SQL transactions go through the= PostgreSQL server =96 on Windows this is using an ODBC / OLE DB driver.&nb= sp; You will never be able to read the data out of the flat files, so yes y= ou need PostgreSQL to be running to access it (hence the best approach is t= o leave the service to start automatically, so if the server reboots, Postg= reSQL will be already running again.)

 

All connections go through port 543= 2 (the default) so make sure this is opened up on your firewall (on Windows= 2003 R2 or XP SP2 don't forget to check the Windows Firewall.)

 

If your Java apps accessing Postgre= SQL go through TCP/IP (i.e. they sit on client machines on a LAN and talk b= ack to the server), you will need to edit your pg_hba.conf file (access thr= ough the Start menu > Programs > PostgreSQL).  And add a line li= ke (under # IPv4=85)

 

host      = user      database     &n= bsp;    192.168.1.0/24   md5

 

Replace "user" with your Java apps = connection user (or you can set it to "all" to allow any user access)

Replace "database" with the databas= e name of your app (or you can set it to "all" to allow any access to any d= atabase)

Replace 192.168.1.0/24 with your network's IP range (or if you don't want to restrict to any = particular network, use 0.0.0.0/0.)

 

Md5 is the authentication method = =96 you can set to "trust" instead of md5 to allow any connection without a= password being required (this should be restricted to the localhost ( 127.0.0.1/32) only, or at worst, your l= ocal network for obvious security reasons).  However md5 states that a= valid password must be required to connect.  I believe you can use cr= ypt as well.

 

Well done on choosing PostgreSQL!&n= bsp; I'm sure when you get up and running to know the system you'll be glad= of the choice you made.=20

 

Andy


PS.  Don't forget to CC th= e mailing list into your responses so others can follow the conversation.

 

 

 


From: Syst= em Consult [mailto: systemconsult@gmail.com] Sent: 09 May 2006 12:27 pm=
To: andy.shellam@mailnetwork.co.uk
Subject: Re: [ADMIN] Locallhost Windows installation

On 09/05/06, Andy Shellam < andy.shellam@mailnetwork.co.uk> wrote:

You should ideally install it as a = Windows service.  You can restrict access to the server using the pg_h= ba.conf to the local machine only so other network machines cannot connect.=   The windows service means that PostgreSQL can be controlled automati= cally at startup, rather than have to be started manually.=20

 

You define the data directory in th= e MSI installer (although I believe this is my default under C:\Program Fil= es\PostgreSQL\Data.)=20

 

To use the database, you need a man= agement program, such as PgAdmin III =96 this ships with the MSI installer,= if you install this at the same time as you install Postgres, it'll add a = connection to PgAdmin for the local server.=20

 

The latest version manual can be fo= und on the documentation website =96 that'll give you any information you n= eed regarding config files etc.=20

 

Andy

 


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of System Consult
Sent: 09 May 2006 10:47 am
To: pgsql-admin@postgresql.org
Subj= ect: [ADMIN] Locallhost Windows installation