Docker and mysql

Hi all, I have 2 questions, maybe someone can help me

I have Docker on my macos Sequoia 15.2

  1. Is there any way to run mysql locally without docker? I tried many solutions and nothing. Maybe someone have working decission?
  2. I created DB container in docker, can I connect to this container outside from docker? I mean from some site on localhost based on nginx or apache (not in docker container). And, maybe, some espessial method to connect if this site will be on wordpress

When using Docker Desktop, all containers are usually run in a Linux VM on host.

  1. With Docker Desktop, you should be able to connect to host network listening ports via host.docker.internal from inside a container
  2. When accessing a container from host, you need to publish the port on service/container and VM

As I am not a Docker Desktop user, I can’t tell you if this works by default or needs to be specifically enabled.