Search Postgresql Archives

Re: Exception while accessing database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manohar Bhattarai wrote:
Hi,
This problem was initially asked to pgsql-jdbc@xxxxxxxxxxxxxx <mailto:pgsql-jdbc@xxxxxxxxxxxxxx> and I was suggested to ask this problem here. So my initial problem was that i was not able to set the Driver for postgresql. I solved that problem with the help there.

But I have a new exception and it is :
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"

I am giving the line for connection that i am using :
connection = DriverManager.getConnection(connectionURL, "postgres", "mypasswordhere");

But the password is the same that i use to login postgres user in the terminal.
What could be the problem?


from the psql command line tool, ALTER USER username WITH PASSWORD 'mypasswordhere';

However, your app probably shouldn't be using the postgres account, instead it should be using a different account (and database)

   CREATE USER someuser WITH PASSWORD 'somepassword';
   CREATE DATABASE somedatabase WITH OWNER someuser;

then use that user and database instead.
.....



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux