aspose file tools
The moose likes JDBC and Relational Databases and the fly likes MySql Database connectivity problem - Communications link failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "MySql Database connectivity problem - Communications link failure" Watch "MySql Database connectivity problem - Communications link failure" New topic
Author

MySql Database connectivity problem - Communications link failure

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 249

Hi,

I am having problem in connecting my web services with database. This is my code fro connection-

It gives the following error-

But when I connect with database at localhost, it works fine with no such error.
I have checked many links but not getting any specific solution. Please help.


Astha - OCPJP 6 (90%)
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1482
    
    6

Can you ping the specified ip? If ping works try to telnet the ip on the specific port and see the response.


Swastik
Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 249

I added a new user in database. In place of root user I created connection string with new username and password and now it works fine
Thanks for the help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySql Database connectivity problem - Communications link failure