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. Just what I was looking for. Great work. thx.
View Tutorial          By: SP Goh at 2008-03-24 01:09:09

2. thank for the sharing.
View Tutorial          By: likelove at 2014-11-22 12:41:58

3. @Askia-Just change RadioButton1 to RadioButton2 in
View Tutorial          By: Nelson at 2010-03-06 23:12:36

4. Dear All, I am getting the following exception for
View Tutorial          By: Protik Basu at 2008-10-31 05:30:36

5. I faced an exception "java.net.connectExcepti
View Tutorial          By: Sandhya Rani Vellanki at 2010-11-15 00:39:24

6. I have compiled by keeping all the points in mind
View Tutorial          By: Sweety at 2011-03-09 22:29:18

7. Hi sir,
please send some sample code for sp

View Tutorial          By: hindu at 2013-03-21 06:00:09

8. Thanks for Your valuable Explanation.
View Tutorial          By: Srikanth at 2012-12-24 10:49:02

9. Dear admin,
your Recaptcha design is not go

View Tutorial          By: surendra kumar sharma at 2013-02-02 05:58:35

10. Thanks a lot man with the server -side code.
View Tutorial          By: bot at 2011-12-03 15:04:28