Exception while accessing database

--0016e68ded48a3763d048810324e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,
This problem was initially asked to pgsql-jdbc [at] postgresql.org 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 fo=
r
user "postgres"

I am giving the line for connection that i am using :
connection =3D 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?


I am using (Linux)Ubuntu 8.04 as OS, Postgresql is 8.3, java is jdk1.6,
using Eclipse as IDE, and trying to make a project in jsp.

My problem is that I had installed postgresql8.3 successfully. and after
some search on the google gave me some configuration details which i
followed. But I am not able to understand how to start creating a new user
and a new database after a fresh installation of postgres.

Can you provide me with come details to how to create a new user and new
database after a new installation of postgres?

If you need any more details i will provide them. Please help me solve this
problem.
--
Regards,
Manohar Bhattarai (=E0=A4=AE=E0=A4=A8=E0=A5=8B=E0=A4=B9=E0=A4=B0 =E0=A4=AD=
=E0=A4=9F=E0=A5=8D=E0=A4=9F=E0=A4=B0=E0=A4=BE=E0=A4=88)
Blogs:
http://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/manoharmailme
Identi.ca :- http://identi.ca/manoharbhattarai

--0016e68ded48a3763d048810324e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div>This problem was initially asked to <a href=3D"mailto:pgsql-j=
dbc [at] postgresql.org">pgsql-jdbc [at] postgresql.org</a> and I was suggested to as=
k this problem here.<div>So my initial problem was that i was not able to s=
et the Driver for postgresql. I solved that problem with the help there.</d=
iv>

<div><br clear=3D"all"><span style=3D"font-family:arial, sans-serif;font-si=
ze:13px;border-collapse:collapse">But I have a new exception and it is :<di=
v><span style=3D"font-family:'Times New Roman';font-size:medium">or=
g.postgresql.util.PSQLException: FATAL: password authentication failed for =
user "postgres"</span></div>


<div><br></div><div>I am giving the line for connection that i am using :</=
div><div>connection =3D DriverManager.getConnection(connectionURL, "po=
stgres", "mypasswordhere");</div><div><br></div><div>But the=
password is the same that i use to login postgres user in the terminal.</d=
iv>


<div>What could be the problem?</div><div><br></div><div><br></div><div>I a=
m using (Linux)Ubuntu 8.04 as OS, Postgresql is 8.3, java is jdk1.6, using =
Eclipse as IDE, and trying to make a project in jsp.</div><div><br></div>

<div>My problem is that I had installed postgresql8.3 successfully. and aft=
er some search on the google gave me some configuration details which i fol=
lowed. But I am not able to understand how to start creating a new user and=
a new database after a fresh installation of postgres.</div>

<div><br></div><div>=C2=A0Can you provide me with come details to how to cr=
eate a new user and new database after a new installation of postgres?</div=
></span><div><br></div><div>If you need any more details i will provide the=
m. Please help me solve this problem.</div>

-- <br>Regards,<br>Manohar Bhattarai (=E0=A4=AE=E0=A4=A8=E0=A5=8B=E0=A4=B9=
=E0=A4=B0 =E0=A4=AD=E0=A4=9F=E0=A5=8D=E0=A4=9F=E0=A4=B0=E0=A4=BE=E0=A4 =88)<=
br>Blogs: <br><a href=3D"http://manoharbhattarai.wordpress.com/" target=3D"=
_blank">http://manoharbhattarai.wordpress.com/</a><br><a href=3D"http://man=
oharbhattarai.posterous.com/" target=3D"_blank">http://manoharbhattarai.pos=
terous.com/</a><br>


<a href=3D"http://manoharbhattarai.blogspot.com/" target=3D"_blank">http://=
manoharbhattarai.blogspot.com/</a><br>Microblogs:<br>Twitter :- <a href=3D"=
http://twitter.com/manoharmailme" target=3D"_blank">http://twitter.com/mano=
harmailme</a><br>

Identi.ca :- <a href=3D"http://identi.ca/manoharbhattarai" target=3D"_blank=
">http://identi.ca/manoharbhattarai</a><br>

</div>

--0016e68ded48a3763d048810324e--
Manohar Bhattarai [ Mi, 02 Juni 2010 20:23 ] [ ID #2042496 ]

Re: Exception while accessing database

Manohar Bhattarai <manoharbhattarai [at] gmail.com> wrote:

> FATAL: password authentication failed for user "postgres"

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

When you say "postgres user in the terminal", do you mean logging in
to the operating system? If so, that has nothing to do with the
database login unless you choose to make it so by having an "ident"
entry in the pg_hba.conf file.

http://www.postgresql.org/docs/8.3/interactive/client-authen tication.html

> I am not able to understand how to start creating a new user
> and a new database after a fresh installation of postgres.

Once you get logged in with the postgres user, that would be the
CREATE DATABASE and CREATE USER statements:

http://www.postgresql.org/docs/8.3/interactive/sql-createdat abase.html

http://www.postgresql.org/docs/8.3/interactive/sql-createuse r.html

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner [ Mi, 02 Juni 2010 22:44 ] [ ID #2042504 ]

Re: Exception while accessing database

--001636c5c0137932e6048846d25c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 3, 2010 at 2:14 AM, Kevin Grittner
<Kevin.Grittner [at] wicourts.gov>wrote:

> Manohar Bhattarai <manoharbhattarai [at] gmail.com> wrote:
>
> > FATAL: password authentication failed for user "postgres"
>
> > But the password is the same that i use to login postgres user in
> > the terminal.
> > What could be the problem?
>
> When you say "postgres user in the terminal", do you mean logging in
> to the operating system? If so, that has nothing to do with the
> database login unless you choose to make it so by having an "ident"
> entry in the pg_hba.conf file.
>
> http://www.postgresql.org/docs/8.3/interactive/client-authen tication.html
>
> > I am not able to understand how to start creating a new user
> > and a new database after a fresh installation of postgres.
>
> Once you get logged in with the postgres user, that would be the
> CREATE DATABASE and CREATE USER statements:
>
> http://www.postgresql.org/docs/8.3/interactive/sql-createdat abase.html
>
> http://www.postgresql.org/docs/8.3/interactive/sql-createuse r.html
>
> -Kevin
>


Thank you. The problem is solved. :) Thanks for your help.
--
Regards,
Manohar Bhattarai (=E0=A4=AE=E0=A4=A8=E0=A5=8B=E0=A4=B9=E0=A4=B0 =E0=A4=AD=
=E0=A4=9F=E0=A5=8D=E0=A4=9F=E0=A4=B0=E0=A4=BE=E0=A4=88)
Blogs:
http://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/manoharmailme
Identi.ca :- http://identi.ca/manoharbhattarai

--001636c5c0137932e6048846d25c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Jun 3, 2010 at 2:14 AM, Kevin Gr=
ittner <span dir=3D"ltr"><<a href=3D"mailto:Kevin.Grittner [at] wicourts.gov"=
>Kevin.Grittner [at] wicourts.gov</a>></span> wrote:<br><blockquote class=3D"=
gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex;">

<div class=3D"im">Manohar Bhattarai <<a href=3D"mailto:manoharbhattarai [at] =
gmail.com">manoharbhattarai [at] gmail.com</a>> wrote:<br>
<br>
> FATAL: password authentication failed for user "postgres"<br=
>
<br>
</div><div class=3D"im">> But the password is the same that i use to log=
in postgres user in<br>
> the terminal.<br>
> What could be the problem?<br>
<br>
</div>When you say "postgres user in the terminal", do you mean l=
ogging in<br>
to the operating system? =C2=A0If so, that has nothing to do with the<br>
database login unless you choose to make it so by having an "ident&quo=
t;<br>
entry in the pg_hba.conf file.<br>
<br>
<a href=3D"http://www.postgresql.org/docs/8.3/interactive/client-authentica=
tion.html" target=3D"_blank">http://www.postgresql.org/docs/8.3/interac tive=
/client-authentication.html</a><br>
<div class=3D"im"><br>
> I am not able to understand how to start creating a new user<br>
> and a new database after a fresh installation of postgres.<br>
<br>
</div>Once you get logged in with the postgres user, that would be the<br>
CREATE DATABASE and CREATE USER statements:<br>
<br>
<a href=3D"http://www.postgresql.org/docs/8.3/interactive/sql-createdatabas=
e.html" target=3D"_blank">http://www.postgresql.org/docs/8.3/interac tive/sq=
l-createdatabase.html</a><br>
<br>
<a href=3D"http://www.postgresql.org/docs/8.3/interactive/sql-createuser.ht=
ml" target=3D"_blank">http://www.postgresql.org/docs/8.3/interac tive/sql-cr=
eateuser.html</a><br>
<font color=3D"#888888"><br>
-Kevin<br>
</font></blockquote></div><br><br clear=3D"all">Thank you. The problem is s=
olved. :) Thanks for your help.<br>-- <br>Regards,<br>Manohar Bhattarai (=
=E0=A4=AE=E0=A4=A8=E0=A5=8B=E0=A4=B9=E0=A4=B0 =E0=A4=AD=E0=A4=9F=E0=A5=8D=
=E0=A4=9F=E0=A4=B0=E0=A4=BE=E0=A4=88)<br>Blogs: <br><a href=3D"http://manoh=
arbhattarai.wordpress.com/">http://manoharbhattarai.wordpres s.com/</a><br>

<a href=3D"http://manoharbhattarai.posterous.com/">http://manoharbhattarai.=
posterous.com/</a><br><a href=3D"http://manoharbhattarai.blogspot.com/">htt=
p://manoharbhattarai.blogspot.com/</a><br>Microblogs:<br>Twitter :- <a href=
=3D"http://twitter.com/manoharmailme">http://twitter.com/man oharmailme</a><=
br>

Identi.ca :- <a href=3D"http://identi.ca/manoharbhattarai">http://identi.ca=
/manoharbhattarai</a><br>

--001636c5c0137932e6048846d25c--
Manohar Bhattarai [ Sa, 05 Juni 2010 13:34 ] [ ID #2042659 ]
Datenbanken » gmane.comp.db.postgresql.admin » Exception while accessing database

Vorheriges Thema: Strange performance issue apparently causd by pg_stat timeout
Nächstes Thema: Firebird To postgresql migration help needed