Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MySql Database connectivity problem - Communications link failure  RSS feed

 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Swastik Dey
Rancher
Posts: 1784
14
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you ping the specified ip? If ping works try to telnet the ip on the specific port and see the response.
 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!