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. wehhh... so so so difficult
View Tutorial          By: sam at 2013-02-28 01:55:41

2. i can saved when i run the program...
but w

View Tutorial          By: kathleen ashley at 2010-08-02 05:22:46

3. the discussion is not enogh
View Tutorial          By: gulstan at 2011-03-27 03:47:24

4. This is an excerpt from Java Complete Reference.Ju
View Tutorial          By: Guest at 2010-03-25 01:36:57

5. realy i enjoy it for visit your site. and i unders
View Tutorial          By: vinod balot at 2015-02-09 17:43:30

6. hi, srinivas ... i too was having the same problem
View Tutorial          By: Ashish at 2009-04-07 06:57:31

7. thanks
View Tutorial          By: Tejaswini C at 2011-12-23 17:57:03

8. Nice for java examples, it is easy to understand j
View Tutorial          By: Nirmaladevi.T at 2009-06-19 04:42:51

9. Great!! But when I use wscompile to create stub,I
View Tutorial          By: Baven at 2008-07-22 15:55:52

10. meow is simple and awesome
View Tutorial          By: vishnu prasanth at 2013-01-10 10:00:35