Reputation: 9076
I have a Laravel Sail app that was installed without the MySql service, since I want to use the MySql server on the local mac where the application is installed.
How do I do this? Presumably I need to modify the docker-compose file to redirect port 3306, but how? (I tried binding 3306:3306 in docker-compose beneath the line assigning port 80, but it tells me the port is already taken).
Upvotes: 1
Views: 847
Reputation: 9076
As it turns out, the answer is quite simple. Use host.docker.internal
as the hostname when inside the container.
Upvotes: 4