I am using a data pipeline tool and I'm trying to integrate with a MYSQL database in Docker "local-mysql" that has its own container on port 3306. While the data pipeline tool called Mage.AI is also in Docker in it's own container. How can I connect the data pipeline tool to see the "local-mysql" container?
see configs I have in the tool below:
database: kdtestdb
host: localhost
port: 3306
username: root
password: mypassword
connection_method: direct
ssh_host: null
ssh_port: 22
ssh_username: null
ssh_password: null
ssh_pkey: null
PS: I created my mysql container with this command:
docker run --name local-mysql -e MYSQL_ROOT_PASSWORD=mypassword -p 3306:3306 -d mysql:latest
This solution by Thomasleveil solved by problem:
From inside of a Docker container, how do I connect to the localhost of the machine?
i.e.
host.docker.internal