Reputation: 1635
I have a Symfony project which I'm running in 3 docker containers:
I have another (Laravel) project which is running through the pre-packaged Vagrant Box setup (Homestead).
I'm now trying to connect to the MySQL database (of the Docker setup) from within the Vagrant box of my Laravel project.
What I know for sure:
Host: 127.0.0.1
Port: 3306
What I don't know:
Upvotes: 0
Views: 1458
Reputation: 20726
If you can connect from your Workstation in should also work from the VM.
Simply use as connection parameter:
Important: Publish the port of the Container with : -p 3306:3306
Upvotes: 1