How to connect database container remotely?

How can I connect database in container from other server or through internet? Or like client from my laptop?
My docker is running on azure with endpoint port of 3306… I created mysql database container on each host.
mysql container has dedicated ip address, but that seems like always started with 172.xxx.xxx.xxx.
I tried to use host vip with ip, but it didn’t work. I tried to replicate database, but my slave database cannot connect although replication configuration looks ok. Network in container is a bit challenging. Any help will be appreciate it.