Comment on Tutorial - Using JDBC to connect to MySQL from Java Program By Rajan



Comment Added by : Partha

Comment Added at : 2009-11-28 11:32:53

Comment on Tutorial : Using JDBC to connect to MySQL from Java Program By Rajan
It seems like your getConnection doesnt recognize the credentials you pass. Can you try like this?

String url = "jdbc:mysql://localhost:3306/details";
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection (url, "root", "root");


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Hi Rima,

Check out http://forums.su

View Tutorial          By: Ramlak at 2008-12-28 03:00:01

2. it was so nice .................i can easily solve
View Tutorial          By: pravin at 2012-07-14 06:15:33

3. if i want to write my gmail address how can i prov
View Tutorial          By: asmcn at 2011-12-27 19:40:49

4. Hibernate with annotations and QBE api reduced our
View Tutorial          By: Andrew at 2011-04-29 10:34:26

5. I get an error returned saying the SMPT server req
View Tutorial          By: Christian Peut at 2011-04-04 04:35:51

6. how to create inode address using c++
View Tutorial          By: pooja at 2014-06-24 05:50:33

7. Can u send total code, i am in critical position n
View Tutorial          By: ram at 2011-05-16 07:07:10

8. U did'nt explain super(a,B)
View Tutorial          By: Rafiqullah at 2013-12-16 10:30:41

9. Can you please tell me what software to be install
View Tutorial          By: Heena Yeole at 2015-03-10 18:05:18

10. Reading the above comments and questions I have my
View Tutorial          By: running on toaster at 2013-04-23 02:20:43