I can't connect mysql using jsp in my server.It shows some error like this.
""" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1,300,257,595,704 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. """"
Can you help me to resolve this problem.I set classpath for the mysql connector jar (/home/aghiltu/apache-tomcat-6.0.26/lib/mysql-connector-java-5.1.8-bin.jar).....
And i also tried that kept the this jar in my WEB-INF/classes but no use , same error.
Put mysql-connector-java-5.0.5.jar in the lib folder of apache tomcat.
For more information, visit the following links:
Hi, Thanks for your help.... I tried it myself and it connects the database when I gave the hostname as ""localhost"" but not in the case of hostname as ""aghiltu""..... I'm using this for my web app ..... when i use my apps on another system,the database will get fail to connect due to the "localhost"......
What is the solution for this?
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.