Docker Community Forums

Share and learn in the Docker community.

Connect to MySQL running in localhost outside docker container from a springboot microservice running inside a docker container

I have a MySQL instance running in my Laptop. It is not running inside docker container.

I have a springboot microservice running inside a docker container.

From the microservice how can I connect to the MysSQL database? It works fine when I run the microservice directly without creating any docker image or without running a container.

Use the IP address of your laptop to connect to it.