NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

cannot connect to mySql database

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
sijran



Joined: 10 Aug 2010
Posts: 2

PostPosted: Tue Aug 10, 2010 2:21 am    Post subject: cannot connect to mySql database Reply with quote

I've given
Class.forName("com.mysql.jdbc.Driver");
String conURL="jdbc:mysql://localhost:3306/practice";
con=DriverManager.getConnection(conURL);
in a class which is accesing my database created in MySql using phpMyadmin. I've also downloaded \mysql-connector-java-5.1.13\mysql-connector-java-5.1.13-bin\com\mysql\jdbc file of mysql but do not know how to use of it . Please somebody help me.
Back to top
julsorio



Joined: 05 Jun 2009
Posts: 168
Location: Bogota, Colombia, South America

PostPosted: Tue Aug 10, 2010 4:53 pm    Post subject: Re: cannot connect to mySql database Reply with quote

con = DriverManager.getConnection(conUrl, "user", "password");

On 9 August 2010 21:21, sijran <address-removed ([email]address-removed[/email])> wrote:
Quote:
I've given
Class.forName("com.mysql.jdbc.Driver");
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo