Обсуждение:

Поиск
Список
Период
Сортировка

От
Milan Bulatović
Дата:

Hello,

I work with MySQL and MS SQL but I am new in Postgre SQL . When I try to establish connection I receive message about error.

 

I work on Windows XP Pro and pgAdmin III.

 

What I make wrong?

 

Thanks Milan

 

Вложения

Re:

От
Raymond O'Donnell
Дата:
On 28/12/2011 13:18, Milan Bulatović wrote:
> Hello,
> 
> I work with MySQL and MS SQL but I am new in Postgre SQL . When I try to
> establish connection I receive message about error.
> 
>  
> 
> I work on Windows XP Proand pgAdmin III.
> 
>  
> 
> What I make wrong?

Try leaving the "Service" field blank and see what happens.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re:

От
Raymond O'Donnell
Дата:
On 29/12/2011 12:00, Milan Bulatović wrote:
> Hello Raymond.
> 
> I am software engineer in small software company "Promona" from Split in
> Croatia.
> We work in C++, C# and with MYSQL and MSSQL.
> This is my first step with PostgreSQL so I need help. 

Hello Milan,

Please keep your replies on the list - that way others will see them and
possibly benefit from them.

[snip]

> I receive message that problem is in pg_hba.conf file.
> 
> My question is where to put that file and what to put in it? 

It will have been created automatically for you when you installed
PostgreSQL - the database won't work without it.

> I'll find that file sample in C:\Program Files\PostgreSQL\9.1\share as
> pg_hba.conf file.sample. I make my own file pg_hba.conf file in same
> directory.

No need - and the DB server won't use that one anyway. Just edit the
real one, which ought to be in the PostgreSQL data directory - I can't
remember where it goes by default (I've put mine somewhere
non-standard), but it might be:
  C:\Program Files\PostgreSQL\9.1\data\pg_hba.conf

If you've already changed settings in postgresql.conf, it'll be in the
same directory.

Hope this helps,

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re:

От
Raymond O'Donnell
Дата:
On 30/12/2011 08:02, Milan Bulatović wrote:
> Hello Raymond
> 
> You are right, file pg_hba.conf exist in folder Data.
> 
> I put next active line in it
> 
> host    all             all             192.168.1.24            md5
> 
> How it look like when open pg_hba.conf with pgAdmin3 you see in attach.
> 
> When I try to open server I receive message "could not load pg_hba.conf".


Please keep your replies to the list.

You need to specify the address in CIDR form. So for a single host, as
you have above, it should be 192.168.1.24/32. If you want to allow
access from all hosts on a subnet with mask 255.255.255.0, it would be
192.168.1.0/24.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re:

От
Raymond O'Donnell
Дата:
On 04/01/2012 12:48, Milan Bulatović wrote:
> Hello Raymond.
> 
> On my computer parameters are:
> 
> Ip address         192.168.1.24
> Subnet mask     255.255.255.0
> Default Gateway    192.168.1.1
> 
> Preferred DNS server 195.29.150.3
> Alternate DNS server 195.29.150.4 .
> 
> 
> In file pg_hba.conf (attached) I put 
> 
> host    all             all             192.168.1.0/24            md5.
> 
> I attached print screen with message about error.

Milan, *PLEASE* keep your replies on the list. That way others can help
you also, and the thread will be kept in the archives also.

That pg_hba.conf entry looks correct to me. However, in pgAdmin, you
just put the IP address or FQDN of the host with the database server -
so if the database is on 192.168.1.24, then enter just that (and nothing
else) in the "host" field. If pgAdmin is on the same machine as the
database server, then you can also enter 127.0.0.1 or "localhost"

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie