I was trying to access my java web app , which i have containerised with docker containers and i also have containerised my mysql database in a different container , both container are running on the default docker network , and i also tried to ping those containers from each other and i got positive results from it , but when i try to access it on my localhost (as i have mapped the ports of the tomcat server to the host ) machine it shows
Error
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.
I have read a little bit about this error , its related to some sort of connectivity issue with database but through ping
command , i checked the connection.
What could be the reason of this error?