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. Also note that for reverse ordering, If you have a
View Tutorial          By: Dwight at 2011-07-13 22:13:45

2. hey pls tel me, what is the advantage of method ov
View Tutorial          By: divya at 2013-08-27 14:20:22

3. i don,t think so that it is sufficient to understa
View Tutorial          By: amit singh at 2009-05-27 06:54:20

4. how limit for no of users for particular role to s
View Tutorial          By: priyanka at 2014-12-16 13:39:55

5. Hello guys, I'm developing java program to send SM
View Tutorial          By: Rania at 2010-09-08 09:04:47

6. how do one off the alarm after it has triggered th
View Tutorial          By: Asika at 2009-10-01 07:28:50

7. hello sir , i m student of mca . i am working on S
View Tutorial          By: Pallavi at 2013-04-06 13:53:54

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

9. Where should I put the xml file ??????????
View Tutorial          By: Marya at 2014-03-21 16:01:13

10. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: nikhil at 2009-07-22 05:58:55