<p>You need to </p>

<ol>
<li><a href="https://docs.docker.com/engine/reference/builder/#expose" rel="nofollow noreferrer">Expose</a> the server port in the Dockerfile</li>
<li>get the IP that the container is listening on (<em>e.g.</em> <code>docker inspect code-rade_cache_1 |jq .[0].NetworkSettings.Networks[].IPAddress</code> ) -- note that you will need <a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer">JQ</a> installed  on your computer to do this</li>
<li>Set the connection in the <a href="https://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_host" rel="nofollow noreferrer">mysqlphpadmin</a></li>
</ol>

CC BY-SA 4.0
2018-11-20T08:27:36.647Z
2018-11-20T08:27:36.647Z
Bruce Becker
<p>I have installed mariadb inside docker container, and mariadb is running properly inside that container. I want to get access of mariadb through phpMyAdmin from outside docker container.</p>

<p>What will I have to do for that?</p>

<docker><databases><networking>
phpMyAdmin using dockerised database
Raju Jha
# phpMyAdmin using dockerised database

(Asked by: username_0 on 2018-11-20)

I have installed mariadb inside docker container, and mariadb is running properly inside that container. I want to get access of mariadb through phpMyAdmin from outside docker container.

What will I have to do for that?

**Tags:** docker, databases, networking


---

## 1 answers

### Answer by username_1 on 2018-11-20. Score: 1

You need to

1. [Expose](https://docs.docker.com/engine/reference/builder/#expose) the server port in the Dockerfile
2. get the IP that the container is listening on (*e.g.* `docker inspect code-rade_cache_1 |jq .[0].NetworkSettings.Networks[].IPAddress` ) -- note that you will need [JQ](https://stedolan.github.io/jq/) installed on your computer to do this
3. Set the connection in the [mysqlphpadmin](https://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_host)


---

