Re: [GENERAL] Question about jdbc
От | Peter Mount |
---|---|
Тема | Re: [GENERAL] Question about jdbc |
Дата | |
Msg-id | Pine.LNX.3.95.980612184258.11243A-100000@retep.org.uk обсуждение исходный текст |
Ответ на | Question about jdbc (Natali Kolker <natali@u.washington.edu>) |
Список | pgsql-general |
On Fri, 12 Jun 1998, Natali Kolker wrote: > I compiled JDBC sources , that comes with version 6.3 . If possible, upgrade to 6.3.2, as it has a more fuller JDBC implementation, and fewer bugs. > When I am trying to connect to data base , > > "DriverManager.getConnection("jdbc:postgresql://haver:5432/natali", > "natali", "Elina);" > I got a response: > > > > java.sql.SQLException: User authentication failed What do you have set in your pg_hba.conf file? > My jdbc drivers in dir $CLASSPATH/postgresql, > I created my database with command: > createdb -u natali > Username : natali, > Password: Elina > > In perl I write : $conn = Pg::connectdb("dbname = natali");, > and I have connection. > > If somebody can help me , with my " authentification" problem , I would > really appriciate it. JDBC only works using TCP/IP, but (someone correct me if I'm wrong), the Perl interface can use Unix domain sockets, so if you have a different setting in pg_hba.conf, it can cause the fact that perl can connect, but JDBC not. Also, if you defined pg_hba.conf to use password or crypt authentication, ensure you have defined the user in the database, AND a password. A blank password doesn't work. Postgresql-JDBC FAQ: http://www.retep.org.uk/postgres -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
В списке pgsql-general по дате отправления: