Re: [INTERFACES] newbie to both Java and psql trying jdbc-examples

Поиск
Список
Период
Сортировка
От Peter Mount
Тема Re: [INTERFACES] newbie to both Java and psql trying jdbc-examples
Дата
Msg-id Pine.LNX.3.95.980617075601.27478B-100000@taer.maidstone.gov.uk
обсуждение исходный текст
Ответ на newbie to both Java and psql trying jdbc-examples  (Lam Nguyen <lnguyen@osf1.gmu.edu>)
Список pgsql-interfaces
On Wed, 17 Jun 1998, Lam Nguyen wrote:

>     Following the directions closely and I still can't get the
> examples going.  Any pointers are extremely helpfull, as I am running
> out of FAQs. I am trying to run :
>
> /usr/src/pgsql/postgresql-6.3.2/src/interfaces/jdbc$ java
> -Djdbc.driver=postgresql.Driver example.blobtest jdbc:postgresql:mydb
> mylogin mypassword debug
>
> my pg_hba_conf.sample:
>
> local        all                                         password
> host         all         127.0.0.1     255.255.255.255   password

Only the host line affects JDBC. Also, you may want to add a host line for
your hosts network address as well, like:

host    all    192.168.1.1 255.255.255.255 password

> and the result:
>
> PostgreSQL blobtest v6.3 rev 1
>
> DriverManager.initialize: jdbc.drivers = null
> JDBC DriverManager initialized
> registerDriver:
> driver[className=postgresql.Driver,context=null,postgresql.Driver@80c81f9]
> Connecting to Database URL = jdbc:postgresql:mydb
> DriverManager.getConnection("jdbc:postgresql:mydb")
>     trying
> driver[className=postgresql.Driver,context=null,postgresql.Driver@80c81f9]
> -- listing properties --
> password=mypassword
> Protocol=postgresql
> user=mylogin
> PGDBNAME=mydb
> java.sql.SQLException: User authentication failed
>         at postgresql.Connection.<init>(Connection.java:229)

Have you created the user in the database using "create user" ?

--
Peter Mount, peter@maidstone.gov.uk
Postgres email to peter@taer.maidstone.gov.uk & peter@retep.org.uk
Remember, this is my work email, so please CC my home address, as I may
not always have time to reply from work.



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Lam Nguyen
Дата:
Сообщение: newbie to both Java and psql trying jdbc-examples
Следующее
От: Mariano Herrero
Дата:
Сообщение: About postgres libraries