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. Thanks for the explanation. I had read about this
View Tutorial          By: Sidharth Sahoo at 2012-09-12 16:26:07

2. thanks....good explanation...
View Tutorial          By: jiby at 2012-01-14 05:57:33

3. Hello, this is working fine with jpg file. But I w
View Tutorial          By: Ray at 2015-09-01 04:18:00

4. best site ever.
View Tutorial          By: rehan ahmed at 2008-12-10 02:21:32

5. Pl provide me code to send sms using USB modems.
View Tutorial          By: Prayag Singh at 2010-09-27 22:50:34

6. Hi I have a USB bluetooth that plug in my computer
View Tutorial          By: venkat c s at 2008-07-21 12:15:46

7. i will make to try for rms :)
View Tutorial          By: sebo at 2010-05-20 07:38:28

8. Good explanation but I think there's a slight mist
View Tutorial          By: Cheeseman at 2009-05-19 10:12:11

9. How do use qsort to sort lines in text file?
View Tutorial          By: kenny at 2008-11-18 08:59:55

10. Thanks ,got useful information on toString().
View Tutorial          By: jaffar at 2011-08-01 10:15:04