Re: jdbc pg_hba.conf error
От | Bhavana.Rakesh |
---|---|
Тема | Re: jdbc pg_hba.conf error |
Дата | |
Msg-id | 465D9CA4.8060203@noaa.gov обсуждение исходный текст |
Ответ на | Re: jdbc pg_hba.conf error (Devrim GÜNDÜZ <devrim@CommandPrompt.com>) |
Ответы |
Re: jdbc pg_hba.conf error
|
Список | pgsql-general |
Hello, I'm still getting the error [brakesh@lnx383 ~/db_connect]$ java db_connect_pgsql.class Checking if Driver is registered with DriverManager Registered the driver ok, making DB connection now Couldn't connect: print out a stack trace and exit. org.postgresql.util.PSQLException: A connection error has occurred: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "brakesh", database "testing123", SSL off at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnectionV3(AbstractJdbc1Connection.java:337) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:214) at org.postgresql.Driver.connect(Driver.java:139) at java.sql.DriverManager.getConnection(DriverManager.java:559) at java.sql.DriverManager.getConnection(DriverManager.java:189) at db_connect_pgsql.main(db_connect_pgsql.java:25) Here is my updated version of pg_hba.conf file __________________________________________________________________________ # # If you want to allow non-local connections, you need to add more # "host" records. Also, remember TCP/IP connections are only enabled # if you enable "tcpip_socket" in postgresql.conf. # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host all all trust # IPv4-style local connections: host all all 127.0.0.1 255.255.255.255 trust host testing123 brakesh 127.0.0.1 255.255.255.255 trust # IPv6-style local connections: #host all all ::1/128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust # Using sockets credentials for improved security. Not available everywhere, # but works on Linux, *BSD (and probably some others) #local all all ident sameuser #Allow any user from any host with IP address 192.168.93.x to # connect to database "template1" as the same username that ident on that # host identifies him as (typically his Unix username): # #TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host testing123 all 140.90.193.238 255.255.255.0 ident sameuser
В списке pgsql-general по дате отправления: