Hello I have microservice spring boot application which uses mysql db for storing user credentials and some other stuff. All services are up after i start docker compose but I cannot access database and I keep getting the same error:
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.springframework.dao.DataAccessResourceFailureException: Unable to acquire JDBC Connection
Also I added my docker compose file.
I use yaml config for my services and I store credentials in .env but when I tried to hard code them error was still there.
IMPORTANT NOTE: Everything works fine without using docker compose and running it like normal java programs