0

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).

DatsunBing
  • 8,684
  • 17
  • 87
  • 172

1 Answers1

2

As it turns out, the answer is quite simple. Use host.docker.internal as the hostname when inside the container.

DatsunBing
  • 8,684
  • 17
  • 87
  • 172