G
G
georgich2019-11-01 10:43:58
MariaDB
georgich, 2019-11-01 10:43:58

How to connect to Mariadb in docker container from outside?

Greetings.
There is a VPS on which I installed docker and MariaDB. Did according to this manual: https://netpoint-dc.com/blog/ustanovka-i-nastroika...
When trying to connect to the server IP on port 3306, a connection error is generated. Debian 10 system without any configuration. What the hoster issued on that volume and began to install. I have not made any settings for iptables and other things yet. I was not familiar with docker before. Tell me, please, what needs to be done to be able to connect to the database server from the outside?
NB For people with no experience with docker, please don't post your guesses. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2019-11-01
@georgich

If you did everything according to the manual, then this part of the command
makes connections available only on the localhost:
try changing to
... -p 0.0.0.0:3306:3306 ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question