Home > Enterprise >  How to connect remotely to sql database in docker container?
How to connect remotely to sql database in docker container?

Time:11-25

newbie here. I have a docker container with a mysql server on it. I want to be able to work on it on different pc.

Following a guide I did these steps:

1)create a db and an account with all privileges

2)got the machine ip throudh powershell with: "docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' YOUR_CONTAINER_NAME"

3)tried to connect to my server in workbench

It didn't work but I don't really know what I'm doing.

Anybody can give me a step by step guide to follow? Thank you

CodePudding user response:

Add port mapping using docker run -p and modify inbound firewall rules in the PC where container is running to allow traffic on the port from another machine in same network

  • Related