Connect to MariaDB from outside Docker container

I’ve got HASS and MariaDB working correctly in Docker containers. I’m now looking at putting ZoneMinder on the same computer for my IP cameras. ZoneMinder needs access to MariaDB. I don’t want to install a copy of MariaDB outside of Docker, as it would be a waste of computer resources. Since I’m pretty new to Docker, I was wondering if anyone knew how to get an outside app to access a MariaDB container?

Thanks!

I’ve not used MariaDB, but it should be no different to just accessing it from another machine - you just need the IP address and port for the connection, and make the port accessible. Googling tells me the default port is 3306 - have you opened this up in your Docker config?

Yes, the port is already open in Docker. I’ve installed ZoneMinder and all of it’s dependencies. Now I will see if MariaDB can see the modules needed for ZoneMinder to work.