problem in pg_hba.conf file

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

problem in pg_hba.conf file

От:
"Irfan Qaiser" <irfan@appsys.com.pk>
Дата:
I m getting the following error message when i try to get a connection through a jsp file.
 
"Something unusual has occured to cause the driver to fail. Please report this exception: java.sql.SQLException: No pg_hba.conf entry for host 161.58.235.51, user ticket, database theatick "
 
 
where '161.58.235.51' is the ip address of my server and theatick is the database name and tikcet is the user Id for that database
 
whereas pg_hpa.conf file contain two (by default) entries
 
local     all                                                         trust
host     all    127.0.0.1    255.255.255.255            trust
 
is there anything else required in pg_hba.conf or what ????
 
Irfan Qaiser

Re: problem in pg_hba.conf file

От:
tolik@aaanet.ru (Anatoly K. Lasareff)
Дата:
>>>>> "IQ" == Irfan Qaiser  writes:

 IQ> [1  ]
 IQ> I m getting the following error message when i try to get a connection through a jsp file.

 IQ> "Something unusual has occured to cause the driver to fail. Please report this exception: java.sql.SQLException: No pg_hba.conf entry for host 161.58.235.51, user ticket, database theatick "


 IQ> where '161.58.235.51' is the ip address of my server and theatick is the database name and tikcet is the user Id for that database

 IQ> whereas pg_hpa.conf file contain two (by default) entries 

 IQ> local     all                                                         trust
 IQ> host     all    127.0.0.1    255.255.255.255            trust

 IQ> is there anything else required in pg_hba.conf or what ????

 IQ> Irfan Qaiser
 IQ> [2  ]

You have to add following line in pg_hba.conf:

host theatick 161.58.235.51 255.255.255.255 trust
^1   ^2       ^3            ^4              ^5

1. Keyword 'host'
2. Database name
3. IP addres you access from
4. Mask for this address
5. Keyword 'trust'

All the instruction are in the same file - ~pgsql/data/pg_hba.conf

-- 
Anatoly K. Lasareff              Email:       tolik@aaanet.ru 
FAQ