Re: authentication problems
От | Nick Fankhauser |
---|---|
Тема | Re: authentication problems |
Дата | |
Msg-id | NEBBLAAHGLEEPCGOBHDGAEKHDLAA.nickf@ontko.com обсуждение исходный текст |
Ответ на | Re: authentication problems (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: authentication problems-- success!
|
Список | pgsql-admin |
Russ- > > Typing "/usr/local/pgsql/bin/psql -h localhost testdb" starts up my > > database in psql quite nicely Here's a suggestion which certainly doesn't run down the cause satisfactorily, but might meet your goals and add a clue... When you specify the database URL in your java code, try explicitly naming either localhost or 127.0.0.1. Supposedly, JDBC always defaults to localhost if a host is not specified, but from what we've learned so far, psql seems to have no problem if you explicitly point it to localhost using an IP connection, whereas JDBC doesn't connect when left to take the implicit default. So try either "jdbc:postgresql://localhost/testdb" or "jdbc:postgresql://127.0.0.1/testdb" & see what happens. If either works, you have at least achieved your goal of a stable local JDBC connection that doesn't depend on the actual IP address of the local machine. You'll also have one more clue to ponder if you can't sleep nights without knowing *why* the default isn't working as expected. You mentioned at the start of this thread that it works fine for you an a different machine- is the working machine also running Mac OS 10.1? -Nick --------------------------------------------------------------------- Nick Fankhauser nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/
В списке pgsql-admin по дате отправления: