NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
janpihlgren
Posted via mailing list.





PostPosted: Fri Nov 21, 2008 7:39 am    Post subject: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Reply with quote

Just installed NetBeans 6.5 and now try to run som javaprogram that require
connection to a MySQL-database.
I get this errormessage:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
failure
and a point to these rows int the program:
String _url = "jdbc:mysql://localhost:3306/" +database;
Connection conn = DriverManager.getConnection(_url, user, pwd);

I also have these lines before:
try{
Class.forName("com.mysql.jdbc.Driver");
}

In the Library I use this:
MySQLJDBC Driver - mysql-connector-java-5.1.6-bin.jar

Before using NetBeans 6.5 I use 6.1 and MySQLJDBC Driver -
mysql-connector-java-5.1.5-bin.jar and i worked.

My question is what to do?
--
View this message in context: http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20616473.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Futaleufu_John
Posted via mailing list.





PostPosted: Fri Nov 21, 2008 1:02 pm    Post subject: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Reply with quote

It sounds like MySQL server isn't running.

If you are using Windows, make sure mysqld-nt.exe is running. You can use
Task Manager to see if the service is running and Control Panel's
Administrative Tools|Services dialog to start the service if it is not. On
my computer the service name is MySQL.


janpihlgren wrote:
Quote:

Just installed NetBeans 6.5 and now try to run som javaprogram that
require connection to a MySQL-database.
I get this errormessage:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure
and a point to these rows int the program:
String _url = "jdbc:mysql://localhost:3306/" +database;
Connection conn = DriverManager.getConnection(_url, user, pwd);



--
View this message in context: http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20620587.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
janpihlgren
Posted via mailing list.





PostPosted: Fri Nov 21, 2008 1:22 pm    Post subject: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Reply with quote

I'm using Mandriva Linux 2009.0
MySQL server is up and running. I can access it through other programs as
mysql, /usr/bin/mysql-administrator.
So that's not the problem.


Futaleufu_John wrote:
Quote:

It sounds like MySQL server isn't running.

If you are using Windows, make sure mysqld-nt.exe is running. You can use
Task Manager to see if the service is running and Control Panel's
Administrative Tools|Services dialog to start the service if it is not. On
my computer the service name is MySQL.


janpihlgren wrote:
Quote:

Just installed NetBeans 6.5 and now try to run som javaprogram that
require connection to a MySQL-database.
I get this errormessage:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure
and a point to these rows int the program:
String _url = "jdbc:mysql://localhost:3306/" +database;
Connection conn = DriverManager.getConnection(_url, user, pwd);





--
View this message in context: http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20620907.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Omar Vazquez
Posted via mailing list.





PostPosted: Fri Nov 21, 2008 3:26 pm    Post subject: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Reply with quote

I have the same error in some app. after searching in google i found that this error coud be arraised because of the transactions. that means, when a transaction in not roll-back after an exception the conecction is broken (or something like that) and start that message.

Try to check the transactions in your app. to verify if they are closing properly.

2008/11/21 janpihlgren <address-removed ([email]address-removed[/email])>
Quote:

I'm using Mandriva Linux 2009.0
MySQL server is up and running. I can access it through other programs as
mysql, /usr/bin/mysql-administrator.
So that's not the problem.



Futaleufu_John wrote:
Quote:

It sounds like MySQL server isn't running.

If you are using Windows, make sure mysqld-nt.exe is running. You can use
Task Manager to see if the service is running and Control Panel's
Administrative Tools|Services dialog to start the service if it is not. On
my computer the service name is MySQL.


janpihlgren wrote:
Quote:

Just installed NetBeans 6.5 and now try to run som javaprogram that
require connection to a MySQL-database.
I get this errormessage:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure
and a point to these rows int the program:
String _url = "jdbc:mysql://localhost:3306/" +database;
Connection conn = DriverManager.getConnection(_url, user, pwd);





--


View this message in context: http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20620907.html

Sent from the Netbeans IDE Users mailing list archive at Nabble.com.






--
OJVM
Back to top
janpihlgren
Posted via mailing list.





PostPosted: Fri Nov 21, 2008 7:17 pm    Post subject: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Reply with quote

I solved the problem.
I have change OS and have forgotten to chandge the mysql varable
skip-networking.
When i did that everything works as expected. Very Happy
Thanks for trying to help.


Omar Vazquez wrote:
Quote:

I have the same error in some app. after searching in google i found that
this error coud be arraised because of the transactions. that means, when
a
transaction in not roll-back after an exception the conecction is broken
(or
something like that) and start that message.
Try to check the transactions in your app. to verify if they are closing
properly.

2008/11/21 janpihlgren <address-removed>

Quote:

I'm using Mandriva Linux 2009.0
MySQL server is up and running. I can access it through other programs as
mysql, /usr/bin/mysql-administrator.
So that's not the problem.


Futaleufu_John wrote:
Quote:

It sounds like MySQL server isn't running.

If you are using Windows, make sure mysqld-nt.exe is running. You can
use
Quote:
Task Manager to see if the service is running and Control Panel's
Administrative Tools|Services dialog to start the service if it is not.
On
Quote:
my computer the service name is MySQL.


janpihlgren wrote:
Quote:

Just installed NetBeans 6.5 and now try to run som javaprogram that
require connection to a MySQL-database.
I get this errormessage:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications
Quote:
Quote:
link failure
and a point to these rows int the program:
String _url = "jdbc:mysql://localhost:3306/" +database;
Connection conn = DriverManager.getConnection(_url, user,
pwd);

--
View this message in context:
http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20620907.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.




--
OJVM



--
View this message in context: http://www.nabble.com/com.mysql.jdbc.exceptions.jdbc4.CommunicationsException%3A-Communications-link-failure-tp20616473p20627870.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Plotinus



Joined: 23 Nov 2008
Posts: 3

PostPosted: Sun Nov 23, 2008 7:36 pm    Post subject: Reply with quote

thanks, you helped me to find the solution! I was desperated Very Happy
Back to top
ayuinda



Joined: 15 Nov 2013
Posts: 2

PostPosted: Mon Dec 02, 2013 4:08 pm    Post subject: Reply with quote

nice, find the solution now. Great













Blog
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo