dbTalk Databases Forums  

[BUGS] connection problem in postgresql

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] connection problem in postgresql in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Majo George Cheruvathur
 
Posts: n/a

Default [BUGS] connection problem in postgresql - 04-16-2006 , 02:17 PM






------=_Part_5979_13093189.1145195646409
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Dear Sir/Madam,
I am a programmer in sharjah,uae.
Now i am working in postgresql.
I cannot able to connect to postgresql.I am pasting my code here.

Class.forName("org.postgresql.Driver");
Connection conn=3DDriverManager.getConnection("jdbcostgresq l://127.0.0.1=
/*
postgres*", "*postgres*", "sadeen");

here sadeen is my password.
But i don't know what to give where i underlined.
I am working as postgres# prompt in database.

I have created database with -- create database mydatabase;
how to use that database as use mydatabase in mysql.

Looking forward to hear from you,
Yours truly,
George

------=_Part_5979_13093189.1145195646409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>Dear Sir/Madam,</div>
<div>I am a programmer in sharjah,uae.</div>
<div>Now i am working in postgresql.</div>
<div>I cannot able to connect to postgresql.I am pasting my code here.</div=
Quote:
div>&nbsp;</div
<div>&nbsp;Class.forName(&quot;org.postgresql.Driv er&quot;<br>&nbsp;Conne=
ction conn=3DDriverManager.getConnection(&quot;jdbcost gresql://127.0.0.1/=
<u>postgres</u>&quot;, &quot;<u>postgres</u>&quot;, &quot;sadeen&quot;</d=
iv>
<div>&nbsp;</div>
<div>here sadeen is my password.</div>
<div>But i don't know what to give where i underlined.</div>
<div>I am working as postgres#&nbsp;&nbsp;&nbsp; prompt &nbsp;in database.<=
/div>
<div>&nbsp;</div>
<div>I&nbsp;have created database with --&nbsp;create database mydatabase;<=
/div>
<div>how to use that database as use mydatabase in mysql.</div>
<div>&nbsp;</div>
<div>Looking forward to hear from you,</div>
<div>Yours truly,</div>
<div>George</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>

------=_Part_5979_13093189.1145195646409--


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] connection problem in postgresql - 04-16-2006 , 03:29 PM






"Majo George Cheruvathur" <majogeorges (AT) gmail (DOT) com> writes:
Quote:
I cannot able to connect to postgresql.I am pasting my code here.

Class.forName("org.postgresql.Driver");
Connection conn=3DDriverManager.getConnection("jdbcostgresq l://127.0.0.1=
/*
postgres*", "*postgres*", "sadeen");

here sadeen is my password.
But i don't know what to give where i underlined.
This is not a bug.

For help with using the JDBC driver I'd suggest the pgsql-jdbc list;
you're more likely to find people who know about jdbc there. The
people who read pgsql-bugs are mostly core-database hackers.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Luckys
 
Posts: n/a

Default Re: [BUGS] connection problem in postgresql - 04-16-2006 , 11:58 PM



------=_Part_3827_2899317.1145249882432
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

String url =3D "jdbcostgresql://localhost/test";
Properties props =3D new Properties();
props.setProperty("user","fred");
props.setProperty("password","secret");
props.setProperty("ssl","true");
Connection conn =3D DriverManager.getConnection(url, props);

although there are different forms for the url connection string.

Do no forget to have the *.jar in your classpath.

You'd even like to look at this, http://pugs.postgresql.org/uae/

As rightly pointed out by Tom, please choose appropriate mailing list for
the respective problem,

cool.

Luckys.

------=_Part_3827_2899317.1145249882432
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>String url =3D &quot;jdbcostgresql://localhost/test&quot;; <br>Prope=
rties props =3D new Properties();<br>props.setProperty(&quot;user&quot ;,&qu=
ot;fred&quot;<br>props.setProperty(&quot;passwor d&quot;,&quot;secret&quot=
;
<br>props.setProperty(&quot;ssl&quot;,&quot;true&q uot;<br>Connection conn=
=3D DriverManager.getConnection(url, props);</div>
<div>
<p>although there are different forms for the url connection string.</p>
<p>Do no forget to have the *.jar in your classpath.</p>
<p>You'd even like to look at this, <a href=3D"http://pugs.postgresql.org/u=
ae/">http://pugs.postgresql.org/uae/</a></p>
<p>As rightly pointed out by Tom, please choose appropriate mailing list fo=
r the respective problem, </p>
<p>cool.</p>
<p>Luckys.</p></div>

------=_Part_3827_2899317.1145249882432--

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.