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



Comment Added by : ahmed

Comment Added at : 2012-05-11 14:18:46

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

no funciona este
String userName = "userxxxx";
String password = "pasxxxx";
String url = "jdbc:mysql://free.hostingjava.it/dbase";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);

me da este


Cannot connect to database server : Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.


View Tutorial



Ask a Question

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. i m new in java plz send package of simple program
View Tutorial          By: iqbal ahmad at 2009-09-07 01:26:41

2. As a beggnar, i find it varry varry usefuull.... P
View Tutorial          By: Rameeza at 2011-05-17 03:14:50

3. i hav d same error as sudhir has "INVALID PO
View Tutorial          By: JAY SHAH at 2011-02-14 09:33:12

4. when I exported the data to excel there is a value
View Tutorial          By: mizhelle at 2015-10-10 13:17:56

5. how can we split 12+12 into three tokens like 12,+
View Tutorial          By: arjun at 2012-11-26 11:07:24

6. Is it possible to create a Reader class without lo
View Tutorial          By: bs at 2010-10-11 05:42:34

7. Thanks it did help to get complete clarity
View Tutorial          By: Vivek The Great at 2012-05-07 17:31:32

8. yes,it is a very nice example for abstract classe
View Tutorial          By: saranya at 2010-07-16 05:56:53

9. (i'm a senior PHP programmer, but a newbie in JSP,
View Tutorial          By: LOL at 2013-03-22 08:57:21

10. HI,
I am getting this error
Error lo

View Tutorial          By: vijay bhanu at 2009-07-18 08:57:57